<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.20"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>libxlsxwriter: Working with Conditional Formatting</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">libxlsxwriter
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.20 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="PageDoc"><div class="header">
  <div class="headertitle">
<div class="title">Working with Conditional Formatting </div>  </div>
</div><!--header-->
<div class="contents">
<div class="toc"><h3>Table of Contents</h3>
<ul><li class="level1"><a href="#ww_cond_format_start">Getting started with conditional formatting</a><ul><li class="level2"><a href="#ww_cond_format_translate">Convert an Excel conditional format to libxlsxwriter</a></li>
<li class="level2"><a href="#ww_cond_format_struct">Defining a conditional format in libxlsxwriter</a></li>
</ul>
</li>
<li class="level1"><a href="#ww_cond_format_type">Conditional Formatting Types</a><ul><li class="level2"><a href="#ww_cond_format_type_cell">type: cell</a></li>
<li class="level2"><a href="#ww_cond_format_type_time_period">type: time_period</a></li>
<li class="level2"><a href="#ww_cond_format_type_text">type: text</a></li>
<li class="level2"><a href="#ww_cond_format_type_average">type: average</a></li>
<li class="level2"><a href="#ww_cond_format_type_duplicate">type: duplicate</a></li>
<li class="level2"><a href="#ww_cond_format_type_unique">type: unique</a></li>
<li class="level2"><a href="#ww_cond_format_type_top">type: top</a></li>
<li class="level2"><a href="#ww_cond_format_type_bottom">type: bottom</a></li>
<li class="level2"><a href="#ww_cond_format_type_blanks">type: blanks</a></li>
<li class="level2"><a href="#ww_cond_format_type_no_blanks">type: no_blanks</a></li>
<li class="level2"><a href="#ww_cond_format_type_errors">type: errors</a></li>
<li class="level2"><a href="#ww_cond_format_type_no_errors">type: no_errors</a></li>
<li class="level2"><a href="#ww_cond_format_type_formula">type: formula</a></li>
<li class="level2"><a href="#ww_cond_format_type_2_color_scale">type: 2_color_scale</a></li>
<li class="level2"><a href="#ww_cond_format_type_3_color_scale">type: 3_color_scale</a></li>
<li class="level2"><a href="#ww_cond_format_type_data_bar">type: data_bar</a></li>
<li class="level2"><a href="#ww_cond_format_type_icon_set">type: icon_set</a></li>
</ul>
</li>
<li class="level1"><a href="#ww_cond_format_other_properties">Conditional Format Parameters</a><ul><li class="level2"><a href="#ww_cond_format_criteria">parameter: criteria</a></li>
<li class="level2"><a href="#ww_cond_format_value">parameter: value and value_string</a></li>
<li class="level2"><a href="#ww_cond_format_format">parameter: format</a></li>
<li class="level2"><a href="#ww_cond_format_min_value">parameter: min_value and min_value_string</a></li>
<li class="level2"><a href="#ww_cond_format_mid_value">parameter: mid_value and mid_value_string</a></li>
<li class="level2"><a href="#ww_cond_format_max_value">parameter: max_value and max_value_string</a></li>
<li class="level2"><a href="#ww_cond_format_min_rule_type">parameter: min_rule_type</a></li>
<li class="level2"><a href="#ww_cond_format_mid_rule_type">parameter: mid_rule_type</a></li>
<li class="level2"><a href="#ww_cond_format_max_rule_type">parameter: max_rule_type</a></li>
<li class="level2"><a href="#ww_cond_format_min_color">parameter: min_color</a></li>
<li class="level2"><a href="#ww_cond_format_mid_color">parameter: mid_color</a></li>
<li class="level2"><a href="#ww_cond_format_max_color">parameter: max_color</a></li>
<li class="level2"><a href="#ww_cond_format_bar_color">parameter: bar_color</a></li>
<li class="level2"><a href="#ww_cond_format_bar_only">parameter: bar_only</a></li>
<li class="level2"><a href="#ww_cond_format_bar_solid">parameter: bar_solid</a></li>
<li class="level2"><a href="#ww_cond_format_bar_negative_color">parameter: bar_negative_color</a></li>
<li class="level2"><a href="#ww_cond_format_bar_border_color">parameter: bar_border_color</a></li>
<li class="level2"><a href="#ww_cond_format_bar_negative_border_color">parameter: bar_negative_border_color</a></li>
<li class="level2"><a href="#ww_cond_format_bar_negative_color_same">parameter: bar_negative_color_same</a></li>
<li class="level2"><a href="#ww_cond_format_bar_negative_border_color_same">parameter: bar_negative_border_color_same</a></li>
<li class="level2"><a href="#ww_cond_format_bar_no_border">parameter: bar_no_border</a></li>
<li class="level2"><a href="#ww_cond_format_bar_direction">parameter: bar_direction</a></li>
<li class="level2"><a href="#ww_cond_format_bar_axis_position">parameter: bar_axis_position</a></li>
<li class="level2"><a href="#ww_cond_format_bar_axis_color">parameter: bar_axis_color</a></li>
<li class="level2"><a href="#ww_cond_format_data_bar_2010">parameter: data_bar_2010</a></li>
<li class="level2"><a href="#ww_cond_format_stop_if_true">parameter: stop_if_true</a></li>
<li class="level2"><a href="#ww_cond_format_multi_range">parameter: multi_range</a></li>
</ul>
</li>
</ul>
</div>
<div class="textblock"><p>Conditional formatting is a feature of Excel that allows you to apply a format to a cell, or a range of cells, based on definable criteria. For example you might format cells that are &gt;= 50 in red and cells that &lt; 50 in green. Like this:</p>
<div class="image">
<img src="conditional_format1.png" alt=""/>
</div>
<p>There are also types of conditional formats such as color scales and data bars that highlight the relative difference of cells in a range:</p>
<div class="image">
<img src="conditional_format2.png" alt=""/>
</div>
<p>Libxlsxwriter supports almost all of Excel's conditional formatting types and options, which are explained in the sections below.</p>
<h1><a class="anchor" id="ww_cond_format_start"></a>
Getting started with conditional formatting</h1>
<p>Conditional formatting is a feature in Excel that allows you to format cells based on criteria such as greater than or less than, top or bottom 10 items, or items that are above the average for the range.</p>
<p>The best place to start with conditional formats is in Excel. Create an example of the type for conditional format that you want and then translate that into an libxlsxwriter program using the <code><a class="el" href="worksheet_8h.html#a171180f46f54aa816c2b3c6c8688ab17" title="Add a conditional format to a worksheet cell.">worksheet_conditional_format_cell()</a></code> or <code><a class="el" href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95" title="Add a conditional format to a worksheet range.">worksheet_conditional_format_range()</a></code> functions and the <a class="el" href="structlxw__conditional__format.html" title="Worksheet conditional formatting options.">lxw_conditional_format</a> structure. We will walk through an example of this below.</p>
<h2><a class="anchor" id="ww_cond_format_translate"></a>
Convert an Excel conditional format to libxlsxwriter</h2>
<p>Say you wanted to highlight in red all the cells in the range "B1:B9" that have a value less than 33. To do this in Excel you would select the range, click on "Conditional Formatting" and create a rule like this:</p>
<div class="image">
<img src="conditional_format11.png" alt=""/>
</div>
<p>In the image above we see the "type" which is "Cell", the "Criteria" which is "less than", the "Value" which is 33 and the "Custom Format" which is red text. To replicate this in libxlsxwriter we will start by creating the format.</p>
<p>We do this in the same way we create any worksheet format to use in libxlsxwriter by creating a <a class="el" href="structlxw__format.html" title="Struct to represent the formatting properties of an Excel format.">lxw_format</a> object using <a class="el" href="workbook_8h.html#a279a5d7075d09a3931aae9782afede33" title="Create a new Format object to formats cells in worksheets.">workbook_add_format()</a>:</p>
<div class="fragment"><div class="line"><span class="comment">// Add a format with red text.</span></div>
<div class="line"><a class="code" href="structlxw__format.html">lxw_format</a> *custom_format = <a class="code" href="workbook_8h.html#a279a5d7075d09a3931aae9782afede33">workbook_add_format</a>(workbook);</div>
<div class="line"><a class="code" href="format_8h.html#a61981b2080bfe6381ede5358ee05b05c">format_set_font_color</a>(custom_format, <a class="code" href="format_8h.html#abeafc6e8222ba9fcfd4f2c2f4e9ea38baedd7412491d9f34fc5f947ada9d196ec">LXW_COLOR_RED</a>);</div>
</div><!-- fragment --><p>The formats used for conditional formats are the same as any other worksheet format, apart from the fact that Excel restricts some of the available properties. We will look at that below in <a class="el" href="working_with_conditional_formatting.html#ww_cond_format_format">parameter: format</a>.</p>
<p>Next we create a <a class="el" href="structlxw__conditional__format.html" title="Worksheet conditional formatting options.">lxw_conditional_format</a> object. We will use this to set the properties of the conditional format.</p>
<div class="fragment"><div class="line"><span class="comment">// Create a conditional format object. A static object would also work.</span></div>
<div class="line"><a class="code" href="structlxw__conditional__format.html">lxw_conditional_format</a> *conditional_format = calloc(1, <span class="keyword">sizeof</span>(<a class="code" href="structlxw__conditional__format.html">lxw_conditional_format</a>));</div>
</div><!-- fragment --><p>We then set the "Type", "Criteria" and "Value" like in the Excel dialog above:</p>
<div class="fragment"><div class="line"><span class="comment">// Set the format type: a cell conditional:</span></div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>     = <a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92dac9180feb375f5d9302d80467398a0c6e">LXW_CONDITIONAL_TYPE_CELL</a>;</div>
<div class="line"> </div>
<div class="line"><span class="comment">// Set the criteria to use:</span></div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a06fc7b5549574bac769cf93ae7180e3f">criteria</a> = <a class="code" href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6bae8a15acdb209feb53b8948c0e50cc9c3">LXW_CONDITIONAL_CRITERIA_LESS_THAN</a>;</div>
<div class="line"> </div>
<div class="line"><span class="comment">// Set the value to which the criteria will be applied:</span></div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#aa11acc4f64d532fafc7cda9a98dc1fc9">value</a>    = 33;</div>
</div><!-- fragment --><p>We then add the format we created earlier which, again, this is like the Excel dialog:</p>
<div class="fragment"><div class="line"><span class="comment">// Set the format to use if the criteria/value applies:</span></div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a3d3ca3432272ee4d5172349ae030dfcc">format</a>   = custom_format;</div>
</div><!-- fragment --><p>And finally we apply the conditional format to the desired range:</p>
<div class="fragment"><div class="line"><span class="comment">// Now apply the format to data range.</span></div>
<div class="line"><a class="code" href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95">worksheet_conditional_format_range</a>(worksheet, <a class="code" href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a>(<span class="stringliteral">&quot;B1:B9&quot;</span>), conditional_format);</div>
</div><!-- fragment --><p>After we compile and run the program the output would look like this:</p>
<div class="image">
<img src="conditional_format12.png" alt=""/>
</div>
<p>The complete version of this example is shown in <a class="el" href="conditional_format1_8c-example.html">conditional_format1.c</a>. There is also another example that shows more advanced conditional formatting options, see <a class="el" href="conditional_format2_8c-example.html">conditional_format2.c</a>.</p>
<h2><a class="anchor" id="ww_cond_format_struct"></a>
Defining a conditional format in libxlsxwriter</h2>
<p>The <a class="el" href="structlxw__conditional__format.html" title="Worksheet conditional formatting options.">lxw_conditional_format</a> struct is used to define a conditional format in libxlsxwriter. It has number of fields, most of which are optional. The main ones are explained here, as an introduction, and in more detail in the sections below. For reference here is our example from the previous section:</p>
<div class="fragment"><div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>     = <a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92dac9180feb375f5d9302d80467398a0c6e">LXW_CONDITIONAL_TYPE_CELL</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a06fc7b5549574bac769cf93ae7180e3f">criteria</a> = <a class="code" href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6bae8a15acdb209feb53b8948c0e50cc9c3">LXW_CONDITIONAL_CRITERIA_LESS_THAN</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#aa11acc4f64d532fafc7cda9a98dc1fc9">value</a>    = 33;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a3d3ca3432272ee4d5172349ae030dfcc">format</a>   = custom_format;</div>
</div><!-- fragment --><p>The <code>type</code> field in is a required parameter and it has no default value. This defines which type of Excel conditional format will be used.</p>
<p>The <code>criteria</code> field defines the criteria used to evaluate the conditional format. Most conditional formats will have a <code>criteria</code>, in which case it is a required field, but some types such as <code>duplicate</code> or <code>blanks</code> don't need to specify one since it is implicit in the type.</p>
<p>The <code>value</code> or <code>value_string</code> field sets the value to which the criteria is applied. Most conditional formats will have a value, or range of values, to which the <code>criteria</code> is applied, but some types or criteria don't need one.</p>
<p>Finally, the <code>format</code> field defines the <a class="el" href="structlxw__format.html" title="Struct to represent the formatting properties of an Excel format.">lxw_format</a> that will be applied if the conditional format matches. Most conditional formats will used the <code>format</code> field, since that is somewhat the point. However, it isn't actually required, in Excel or in libxlsxwriter, and conditional format types such as Color Scale or Data Bars don't need it since they rely on simpler color definitions.</p>
<p>The allowable <code>type</code> values withe their descriptive and enum values are shown in the following table along with their associated parameters.</p>
<table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadLeft">Type  </th><th class="markdownTableHeadLeft">Enum value  </th><th class="markdownTableHeadLeft">Parameters   </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft" rowspan="8">cell  </td><td class="markdownTableBodyLeft" rowspan="8"><a class="el" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92dac9180feb375f5d9302d80467398a0c6e">LXW_CONDITIONAL_TYPE_CELL</a>  </td><td class="markdownTableBodyLeft">criteria   </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft">value   </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft">value_string   </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft">min_value   </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft">max_value   </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft">min_value_string   </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft">max_value_string   </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft">format   </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft" rowspan="4">text  </td><td class="markdownTableBodyLeft" rowspan="4"><a class="el" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92dacd711f072b3130ccd6ef1c233eba0298">LXW_CONDITIONAL_TYPE_TEXT</a>  </td><td class="markdownTableBodyLeft">criteria   </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft">value   </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft">value_string   </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft">format   </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft" rowspan="2">time_period  </td><td class="markdownTableBodyLeft" rowspan="2"><a class="el" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92da2101fa174d43f88be22789112afb3716">LXW_CONDITIONAL_TYPE_TIME_PERIOD</a>  </td><td class="markdownTableBodyLeft">criteria   </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft">format   </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft" rowspan="2">average  </td><td class="markdownTableBodyLeft" rowspan="2"><a class="el" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92dabdae15fb9048bcd6823c8ff02b553548">LXW_CONDITIONAL_TYPE_AVERAGE</a>  </td><td class="markdownTableBodyLeft">criteria   </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft">format   </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft">duplicate  </td><td class="markdownTableBodyLeft"><a class="el" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92da288a6952f520145b6c00e5ad6d273370">LXW_CONDITIONAL_TYPE_DUPLICATE</a>  </td><td class="markdownTableBodyLeft">format   </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft">unique  </td><td class="markdownTableBodyLeft"><a class="el" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92da058193bb32dae5557ced4117f57a8182">LXW_CONDITIONAL_TYPE_UNIQUE</a>  </td><td class="markdownTableBodyLeft">format   </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft" rowspan="4">top  </td><td class="markdownTableBodyLeft" rowspan="4"><a class="el" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92da0d7cc55cbacac31182eef8bb16b69ab6">LXW_CONDITIONAL_TYPE_TOP</a>  </td><td class="markdownTableBodyLeft">criteria   </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft">value   </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft">value_string   </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft">format   </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft" rowspan="4">bottom  </td><td class="markdownTableBodyLeft" rowspan="4"><a class="el" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92da2da918db0a1930d2e8f818e14424d824">LXW_CONDITIONAL_TYPE_BOTTOM</a>  </td><td class="markdownTableBodyLeft">criteria   </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft">value   </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft">value_string   </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft">format   </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft">blanks  </td><td class="markdownTableBodyLeft"><a class="el" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92da0187499e69ed35a00706a2749c967534">LXW_CONDITIONAL_TYPE_BLANKS</a>  </td><td class="markdownTableBodyLeft">format   </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft">no_blanks  </td><td class="markdownTableBodyLeft"><a class="el" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92da84fcba60bd3f6efa052ba4154a155031">LXW_CONDITIONAL_TYPE_NO_BLANKS</a>  </td><td class="markdownTableBodyLeft">format   </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft">errors  </td><td class="markdownTableBodyLeft"><a class="el" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92dadd06584e94945519df4fc2252882e374">LXW_CONDITIONAL_TYPE_ERRORS</a>  </td><td class="markdownTableBodyLeft">format   </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft">no_errors  </td><td class="markdownTableBodyLeft"><a class="el" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92da70562e7676d45e65a932623728250058">LXW_CONDITIONAL_TYPE_NO_ERRORS</a>  </td><td class="markdownTableBodyLeft">format   </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft" rowspan="3">formula  </td><td class="markdownTableBodyLeft" rowspan="3"><a class="el" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92da970b8654514d6525221bc71da66c5550">LXW_CONDITIONAL_TYPE_FORMULA</a>  </td><td class="markdownTableBodyLeft">value   </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft">value_string   </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft">format   </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft" rowspan="8">2_color_scale  </td><td class="markdownTableBodyLeft" rowspan="8"><a class="el" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92da073422bf8a6df5ddbabb3763aa7b27d8">LXW_CONDITIONAL_2_COLOR_SCALE</a>  </td><td class="markdownTableBodyLeft">min_rule_type   </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft">max_rule_type   </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft">min_value   </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft">max_value   </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft">min_value_string   </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft">max_value_string   </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft">min_color   </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft">max_color   </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft" rowspan="12">3_color_scale  </td><td class="markdownTableBodyLeft" rowspan="12"><a class="el" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92da95e1b05b230b8964f78d676d0b114ed2">LXW_CONDITIONAL_3_COLOR_SCALE</a>  </td><td class="markdownTableBodyLeft">min_rule_type   </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft">mid_rule_type   </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft">max_rule_type   </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft">min_value   </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft">mid_value   </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft">max_value   </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft">min_value_string   </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft">mid_value_string   </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft">max_value_string   </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft">min_color   </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft">mid_color   </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft">max_color   </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft" rowspan="19">data_bar  </td><td class="markdownTableBodyLeft" rowspan="19"><a class="el" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92dae0c88a53343690c1f43385b466dfe45e">LXW_CONDITIONAL_DATA_BAR</a>  </td><td class="markdownTableBodyLeft">min_rule_type   </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft">max_rule_type   </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft">min_value   </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft">max_value   </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft">min_value_string   </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft">max_value_string   </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft">bar_only   </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft">bar_color   </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft">bar_solid*   </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft">bar_negative_color*   </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft">bar_border_color*   </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft">bar_negative_border_color*   </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft">bar_negative_color_same*   </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft">bar_negative_border_color_same*   </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft">bar_no_border*   </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft">bar_direction*   </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft">bar_axis_position*   </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft">bar_axis_color*   </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft">data_bar_2010*   </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft" rowspan="3">icon_set  </td><td class="markdownTableBodyLeft" rowspan="3"><a class="el" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92dad29f06d444d5d900d076551cf057eee5">LXW_CONDITIONAL_TYPE_ICON_SETS</a>  </td><td class="markdownTableBodyLeft">icon_style   </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft">reverse_icons   </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft">icons_only   </td></tr>
</table>
<dl class="section note"><dt>Note</dt><dd>Data bar parameters marked with <code>*</code> are only available in Excel 2010 and later. Files that use these properties can still be opened in Excel 2007 but the data bars will be displayed without them.</dd></dl>
<p>Each conditional format type is explained in more detail in the sections below.</p>
<h1><a class="anchor" id="ww_cond_format_type"></a>
Conditional Formatting Types</h1>
<h2><a class="anchor" id="ww_cond_format_type_cell"></a>
type: cell</h2>
<p>This is the most common conditional formatting type. It is used when a format is applied to a cell, or range of cells, based on a simple criterion.</p>
<p>For example using a single value and the "greater than" criteria:</p>
<div class="fragment"><div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>     = <a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92dac9180feb375f5d9302d80467398a0c6e">LXW_CONDITIONAL_TYPE_CELL</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a06fc7b5549574bac769cf93ae7180e3f">criteria</a> = <a class="code" href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6ba10ffa392949de59161307149c55a971b">LXW_CONDITIONAL_CRITERIA_GREATER_THAN</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#aa11acc4f64d532fafc7cda9a98dc1fc9">value</a>    = 5;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a3d3ca3432272ee4d5172349ae030dfcc">format</a>   = format1;</div>
<div class="line"><a class="code" href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95">worksheet_conditional_format_range</a>(worksheet, <a class="code" href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a>(<span class="stringliteral">&quot;A1:A4&quot;</span>), conditional_format);</div>
</div><!-- fragment --><p>Or, using 2 values and the <code>between</code> criteria:</p>
<div class="fragment"><div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>      = <a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92dac9180feb375f5d9302d80467398a0c6e">LXW_CONDITIONAL_TYPE_CELL</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a06fc7b5549574bac769cf93ae7180e3f">criteria</a>  = <a class="code" href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6ba085943843b38880c58d2af4cd5e85c94">LXW_CONDITIONAL_CRITERIA_BETWEEN</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#af8b4013a50ba2a58fa009dc22dcb9db8">min_value</a> = 20;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a18ce2238c9d2c51b79e9c9206c892a2c">max_value</a> = 30;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a3d3ca3432272ee4d5172349ae030dfcc">format</a>    = format1;</div>
<div class="line"><a class="code" href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95">worksheet_conditional_format_range</a>(worksheet, <a class="code" href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a>(<span class="stringliteral">&quot;A1:A4&quot;</span>), conditional_format);</div>
</div><!-- fragment --><p>If the <code>criteria</code> is "equal to" and the <code>value_string</code> is a text string (but not a cell range) then Excel requires that the text string is double quoted:</p>
<div class="fragment"><div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>         = <a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92dac9180feb375f5d9302d80467398a0c6e">LXW_CONDITIONAL_TYPE_CELL</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a06fc7b5549574bac769cf93ae7180e3f">criteria</a>     = <a class="code" href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6ba70fa69c881508f2643929964ba0c2816">LXW_CONDITIONAL_CRITERIA_EQUAL_TO</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad09997b3e8aa12dba5617739c8839e7d">value_string</a> = <span class="stringliteral">&quot;\&quot;string to match\&quot;&quot;</span>;</div>
</div><!-- fragment --><p>The criteria that apply to Cell conditional formats are:</p>
<ul>
<li><a class="el" href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6ba70fa69c881508f2643929964ba0c2816">LXW_CONDITIONAL_CRITERIA_EQUAL_TO</a>: Format cells equal to a value.</li>
<li><a class="el" href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6ba84a03fcabb316bc4e0dcf7227506c1b6">LXW_CONDITIONAL_CRITERIA_NOT_EQUAL_TO</a>: Format cells not equal to a value.</li>
<li><a class="el" href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6ba10ffa392949de59161307149c55a971b">LXW_CONDITIONAL_CRITERIA_GREATER_THAN</a>: Format cells greater than a value.</li>
<li><a class="el" href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6bae8a15acdb209feb53b8948c0e50cc9c3">LXW_CONDITIONAL_CRITERIA_LESS_THAN</a>: Format cells less than a value.</li>
<li><a class="el" href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6bad288ab1847d59fa1183555c5a82c4d11">LXW_CONDITIONAL_CRITERIA_GREATER_THAN_OR_EQUAL_TO</a>: Format cells greater than or equal to a value.</li>
<li><a class="el" href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6bac8f3cc21e16b8c6d029a9879f5835f41">LXW_CONDITIONAL_CRITERIA_LESS_THAN_OR_EQUAL_TO</a>: Format cells less than or equal to a value.</li>
<li><a class="el" href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6ba085943843b38880c58d2af4cd5e85c94">LXW_CONDITIONAL_CRITERIA_BETWEEN</a>: Format cells between two values.</li>
<li><a class="el" href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6ba1bf47932d37f00e5585273f0f6759075">LXW_CONDITIONAL_CRITERIA_NOT_BETWEEN</a>: Format cells that is not between two values.</li>
</ul>
<h2><a class="anchor" id="ww_cond_format_type_time_period"></a>
type: time_period</h2>
<p>The <code>time_period</code> type is used to specify Excel's "Dates Occurring" style conditional format:</p>
<div class="fragment"><div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>     = <a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92da2101fa174d43f88be22789112afb3716">LXW_CONDITIONAL_TYPE_TIME_PERIOD</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a06fc7b5549574bac769cf93ae7180e3f">criteria</a> = <a class="code" href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6ba71c995839e4851d23289ff4505dc82c4">LXW_CONDITIONAL_CRITERIA_TIME_PERIOD_YESTERDAY</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a3d3ca3432272ee4d5172349ae030dfcc">format</a>   = format1;</div>
<div class="line"><a class="code" href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95">worksheet_conditional_format_range</a>(worksheet, <a class="code" href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a>(<span class="stringliteral">&quot;A1:A4&quot;</span>), conditional_format);</div>
<div class="line"> </div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>     = <a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92da2101fa174d43f88be22789112afb3716">LXW_CONDITIONAL_TYPE_TIME_PERIOD</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a06fc7b5549574bac769cf93ae7180e3f">criteria</a> = <a class="code" href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6bacad0cfdfc5fdcb4a41c60d848a88e3a9">LXW_CONDITIONAL_CRITERIA_TIME_PERIOD_LAST_7_DAYS</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a3d3ca3432272ee4d5172349ae030dfcc">format</a>   = format2;</div>
<div class="line"><a class="code" href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95">worksheet_conditional_format_range</a>(worksheet, <a class="code" href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a>(<span class="stringliteral">&quot;A1:A4&quot;</span>), conditional_format);</div>
</div><!-- fragment --><p>The period is set in the <code>criteria</code> and can have one of the following values:</p>
<ul>
<li><a class="el" href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6ba71c995839e4851d23289ff4505dc82c4">LXW_CONDITIONAL_CRITERIA_TIME_PERIOD_YESTERDAY</a>: Format cells with a date of yesterday.</li>
<li><a class="el" href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6ba9e812ad0c1dddeeeb0c88da9476362df">LXW_CONDITIONAL_CRITERIA_TIME_PERIOD_TODAY</a>: Format cells with a date of today.</li>
<li><a class="el" href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6bad8e068737fb6d9cf3f8c6d03ba480398">LXW_CONDITIONAL_CRITERIA_TIME_PERIOD_TOMORROW</a>: Format cells with a date of tomorrow.</li>
<li><a class="el" href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6bacad0cfdfc5fdcb4a41c60d848a88e3a9">LXW_CONDITIONAL_CRITERIA_TIME_PERIOD_LAST_7_DAYS</a>: Format cells with a date in the last 7 days.</li>
<li><a class="el" href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6ba7effdb9809e343e8a73cce6da31039a5">LXW_CONDITIONAL_CRITERIA_TIME_PERIOD_LAST_WEEK</a>: Format cells with a date in the last week.</li>
<li><a class="el" href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6bab774818428f3453d7e90741cd3fac1a2">LXW_CONDITIONAL_CRITERIA_TIME_PERIOD_THIS_WEEK</a>: Format cells with a date in the current week.</li>
<li><a class="el" href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6ba9721885095f7bd354ddd3c8d45110585">LXW_CONDITIONAL_CRITERIA_TIME_PERIOD_NEXT_WEEK</a>: Format cells with a date in the next week.</li>
<li><a class="el" href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6ba7305b525b5d9552f8c9796248858f987">LXW_CONDITIONAL_CRITERIA_TIME_PERIOD_LAST_MONTH</a>: Format cells with a date in the last month.</li>
<li><a class="el" href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6ba5c2e6be8b0ee591cfae2a2e7437ec35d">LXW_CONDITIONAL_CRITERIA_TIME_PERIOD_THIS_MONTH</a>: Format cells with a date in the current month.</li>
<li><a class="el" href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6ba4b1a66b229e6cb700b40facec0a278be">LXW_CONDITIONAL_CRITERIA_TIME_PERIOD_NEXT_MONTH</a>: Format cells with a date in the next month.</li>
</ul>
<h2><a class="anchor" id="ww_cond_format_type_text"></a>
type: text</h2>
<p>The <code>text</code> type is used to specify Excel's "Specific Text" style conditional format. It is used to do simple string matching using the <code>criteria</code> and <code>value</code> parameters:</p>
<div class="fragment"><div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>         = <a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92dacd711f072b3130ccd6ef1c233eba0298">LXW_CONDITIONAL_TYPE_TEXT</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a06fc7b5549574bac769cf93ae7180e3f">criteria</a>     = <a class="code" href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6baff96b7580e80b2167357a587110f0e5c">LXW_CONDITIONAL_CRITERIA_TEXT_CONTAINING</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad09997b3e8aa12dba5617739c8839e7d">value_string</a> = <span class="stringliteral">&quot;foo&quot;</span>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a3d3ca3432272ee4d5172349ae030dfcc">format</a>       = format1;</div>
<div class="line"><a class="code" href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95">worksheet_conditional_format_range</a>(worksheet, <a class="code" href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a>(<span class="stringliteral">&quot;A1:A4&quot;</span>), conditional_format);</div>
<div class="line"> </div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>         = <a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92dacd711f072b3130ccd6ef1c233eba0298">LXW_CONDITIONAL_TYPE_TEXT</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a06fc7b5549574bac769cf93ae7180e3f">criteria</a>     = <a class="code" href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6ba20233dc769eae6248dde4f5c702d5842">LXW_CONDITIONAL_CRITERIA_TEXT_NOT_CONTAINING</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad09997b3e8aa12dba5617739c8839e7d">value_string</a> = <span class="stringliteral">&quot;bar&quot;</span>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a3d3ca3432272ee4d5172349ae030dfcc">format</a>       = format2;</div>
<div class="line"><a class="code" href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95">worksheet_conditional_format_range</a>(worksheet, <a class="code" href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a>(<span class="stringliteral">&quot;A1:A4&quot;</span>), conditional_format);</div>
<div class="line"> </div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>         = <a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92dacd711f072b3130ccd6ef1c233eba0298">LXW_CONDITIONAL_TYPE_TEXT</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a06fc7b5549574bac769cf93ae7180e3f">criteria</a>     = <a class="code" href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6bacef71d1c45abb3597b83f3f66243fabd">LXW_CONDITIONAL_CRITERIA_TEXT_BEGINS_WITH</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad09997b3e8aa12dba5617739c8839e7d">value_string</a> = <span class="stringliteral">&quot;a&quot;</span>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a3d3ca3432272ee4d5172349ae030dfcc">format</a>       = format2;</div>
<div class="line"><a class="code" href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95">worksheet_conditional_format_range</a>(worksheet, <a class="code" href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a>(<span class="stringliteral">&quot;A1:A4&quot;</span>), conditional_format);</div>
<div class="line"> </div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>         = <a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92dacd711f072b3130ccd6ef1c233eba0298">LXW_CONDITIONAL_TYPE_TEXT</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a06fc7b5549574bac769cf93ae7180e3f">criteria</a>     = <a class="code" href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6ba87a87b39d39957377f89cd0cb40fc0ee">LXW_CONDITIONAL_CRITERIA_TEXT_ENDS_WITH</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad09997b3e8aa12dba5617739c8839e7d">value_string</a> = <span class="stringliteral">&quot;t&quot;</span>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a3d3ca3432272ee4d5172349ae030dfcc">format</a>       = format4;</div>
<div class="line"><a class="code" href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95">worksheet_conditional_format_range</a>(worksheet, <a class="code" href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a>(<span class="stringliteral">&quot;A1:A4&quot;</span>), conditional_format);</div>
</div><!-- fragment --><p>The <code>value_string</code> parameter should be a string with one or more characters.</p>
<p>The <code>criteria</code> for Text conditional formats can have one of the following values:</p>
<ul>
<li><a class="el" href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6baff96b7580e80b2167357a587110f0e5c">LXW_CONDITIONAL_CRITERIA_TEXT_CONTAINING</a>: Format cells that contain the specified text.</li>
<li><a class="el" href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6ba20233dc769eae6248dde4f5c702d5842">LXW_CONDITIONAL_CRITERIA_TEXT_NOT_CONTAINING</a>: Format cells that don't contain the specified text.</li>
<li><a class="el" href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6bacef71d1c45abb3597b83f3f66243fabd">LXW_CONDITIONAL_CRITERIA_TEXT_BEGINS_WITH</a>: Format cells that begin with the specified text.</li>
<li><a class="el" href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6ba87a87b39d39957377f89cd0cb40fc0ee">LXW_CONDITIONAL_CRITERIA_TEXT_ENDS_WITH</a>: Format cells that end with the specified text.</li>
</ul>
<h2><a class="anchor" id="ww_cond_format_type_average"></a>
type: average</h2>
<p>The <code>average</code> type is used to specify Excel's "Average" style conditional format:</p>
<div class="fragment"><div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>     = <a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92dabdae15fb9048bcd6823c8ff02b553548">LXW_CONDITIONAL_TYPE_AVERAGE</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a06fc7b5549574bac769cf93ae7180e3f">criteria</a> = <a class="code" href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6ba7abe5eb7e05b62e5722ee13ea2820be8">LXW_CONDITIONAL_CRITERIA_AVERAGE_ABOVE</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a3d3ca3432272ee4d5172349ae030dfcc">format</a>   = format1;</div>
<div class="line"><a class="code" href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95">worksheet_conditional_format_range</a>(worksheet, <a class="code" href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a>(<span class="stringliteral">&quot;A1:A4&quot;</span>), conditional_format);</div>
<div class="line"> </div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>     = <a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92dabdae15fb9048bcd6823c8ff02b553548">LXW_CONDITIONAL_TYPE_AVERAGE</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a06fc7b5549574bac769cf93ae7180e3f">criteria</a> = <a class="code" href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6baba0dae0546768db046eb00a21269206f">LXW_CONDITIONAL_CRITERIA_AVERAGE_1_STD_DEV_ABOVE</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a3d3ca3432272ee4d5172349ae030dfcc">format</a>   = format2;</div>
<div class="line"><a class="code" href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95">worksheet_conditional_format_range</a>(worksheet, <a class="code" href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a>(<span class="stringliteral">&quot;B1:B4&quot;</span>), conditional_format);</div>
</div><!-- fragment --><p>The type of average for the conditional format range is specified by the <code>criteria</code>:</p>
<ul>
<li><a class="el" href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6ba7abe5eb7e05b62e5722ee13ea2820be8">LXW_CONDITIONAL_CRITERIA_AVERAGE_ABOVE</a>: Format cells above the average for the range.</li>
<li><a class="el" href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6badc3fe6291eea11883810c9291d3af4d6">LXW_CONDITIONAL_CRITERIA_AVERAGE_BELOW</a>: Format cells below the average for the range.</li>
<li><a class="el" href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6ba290e8911e2cfa3fbbd64f02ddbb40465">LXW_CONDITIONAL_CRITERIA_AVERAGE_ABOVE_OR_EQUAL</a>: Format cells above or equal to the average for the range.</li>
<li><a class="el" href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6baf2d5451a9a0972535e477237cc06a15b">LXW_CONDITIONAL_CRITERIA_AVERAGE_BELOW_OR_EQUAL</a>: Format cells below or equal to the average for the range.</li>
<li><a class="el" href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6baba0dae0546768db046eb00a21269206f">LXW_CONDITIONAL_CRITERIA_AVERAGE_1_STD_DEV_ABOVE</a>: Format cells 1 standard deviation above the average for the range.</li>
<li><a class="el" href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6ba23b2745a98c22a4f5225ef3c8d16d63a">LXW_CONDITIONAL_CRITERIA_AVERAGE_1_STD_DEV_BELOW</a>: Format cells 1 standard deviation below the average for the range.</li>
<li><a class="el" href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6ba43291b0deef88804e88432385e82be1a">LXW_CONDITIONAL_CRITERIA_AVERAGE_2_STD_DEV_ABOVE</a>: Format cells 2 standard deviation above the average for the range.</li>
<li><a class="el" href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6ba8694b925d1c861d103615c9f655a34a9">LXW_CONDITIONAL_CRITERIA_AVERAGE_2_STD_DEV_BELOW</a>: Format cells 2 standard deviation below the average for the range.</li>
<li><a class="el" href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6ba7783dd28dd6f5fb261459070edc71ff7">LXW_CONDITIONAL_CRITERIA_AVERAGE_3_STD_DEV_ABOVE</a>: Format cells 3 standard deviation above the average for the range.</li>
<li><a class="el" href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6bac455da6aa12f51e6fa2dbc34bc140ff6">LXW_CONDITIONAL_CRITERIA_AVERAGE_3_STD_DEV_BELOW</a>: Format cells 3 standard deviation below the average for the range.</li>
</ul>
<h2><a class="anchor" id="ww_cond_format_type_duplicate"></a>
type: duplicate</h2>
<p>The <code>duplicate</code> type is used to highlight duplicate cells in a range. It doesn't take a criteria:</p>
<div class="fragment"><div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>   = <a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92da288a6952f520145b6c00e5ad6d273370">LXW_CONDITIONAL_TYPE_DUPLICATE</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a3d3ca3432272ee4d5172349ae030dfcc">format</a> = format1;</div>
<div class="line"><a class="code" href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95">worksheet_conditional_format_range</a>(worksheet, <a class="code" href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a>(<span class="stringliteral">&quot;A1:A4&quot;</span>), conditional_format);</div>
</div><!-- fragment --><h2><a class="anchor" id="ww_cond_format_type_unique"></a>
type: unique</h2>
<p>The <code>unique</code> type is used to highlight unique cells in a range. It doesn't take a criteria:</p>
<div class="fragment"><div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>   = <a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92da058193bb32dae5557ced4117f57a8182">LXW_CONDITIONAL_TYPE_UNIQUE</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a3d3ca3432272ee4d5172349ae030dfcc">format</a> = format1;</div>
<div class="line"><a class="code" href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95">worksheet_conditional_format_range</a>(worksheet, <a class="code" href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a>(<span class="stringliteral">&quot;A1:A4&quot;</span>), conditional_format);</div>
</div><!-- fragment --><h2><a class="anchor" id="ww_cond_format_type_top"></a>
type: top</h2>
<p>The <code>top</code> type is used to specify the top <code>n</code> values by number or percentage in a range:</p>
<div class="fragment"><div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>   = <a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92da0d7cc55cbacac31182eef8bb16b69ab6">LXW_CONDITIONAL_TYPE_TOP</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#aa11acc4f64d532fafc7cda9a98dc1fc9">value</a>  = 10;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a3d3ca3432272ee4d5172349ae030dfcc">format</a> = format1;</div>
<div class="line"><a class="code" href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95">worksheet_conditional_format_range</a>(worksheet, <a class="code" href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a>(<span class="stringliteral">&quot;A1:A4&quot;</span>), conditional_format);</div>
</div><!-- fragment --><p>The <code>criteria</code> can be used to indicate that a percentage condition is required:</p>
<div class="fragment"><div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>     = <a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92da0d7cc55cbacac31182eef8bb16b69ab6">LXW_CONDITIONAL_TYPE_TOP</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a06fc7b5549574bac769cf93ae7180e3f">criteria</a> = <a class="code" href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6baea70f63a3805fd590298e46bcd68f444">LXW_CONDITIONAL_CRITERIA_TOP_OR_BOTTOM_PERCENT</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#aa11acc4f64d532fafc7cda9a98dc1fc9">value</a>    = 10;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a3d3ca3432272ee4d5172349ae030dfcc">format</a>   = format1;</div>
<div class="line"><a class="code" href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95">worksheet_conditional_format_range</a>(worksheet, <a class="code" href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a>(<span class="stringliteral">&quot;A1:A4&quot;</span>), conditional_format);</div>
</div><!-- fragment --><h2><a class="anchor" id="ww_cond_format_type_bottom"></a>
type: bottom</h2>
<p>The <code>bottom</code> type is used to specify the bottom <code>n</code> values by number or percentage in a range.</p>
<p>It takes the same parameters as <code>top</code>, see above.</p>
<h2><a class="anchor" id="ww_cond_format_type_blanks"></a>
type: blanks</h2>
<p>The <code>blanks</code> type is used to highlight blank cells in a range:</p>
<div class="fragment"><div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>   = <a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92da0187499e69ed35a00706a2749c967534">LXW_CONDITIONAL_TYPE_BLANKS</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a3d3ca3432272ee4d5172349ae030dfcc">format</a> = format1;</div>
<div class="line"><a class="code" href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95">worksheet_conditional_format_range</a>(worksheet, <a class="code" href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a>(<span class="stringliteral">&quot;A1:A4&quot;</span>), conditional_format);</div>
</div><!-- fragment --><h2><a class="anchor" id="ww_cond_format_type_no_blanks"></a>
type: no_blanks</h2>
<p>The <code>no_blanks</code> type is used to highlight non blank cells in a range. It doesn't take a criteria:</p>
<div class="fragment"><div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>   = <a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92da84fcba60bd3f6efa052ba4154a155031">LXW_CONDITIONAL_TYPE_NO_BLANKS</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a3d3ca3432272ee4d5172349ae030dfcc">format</a> = format1;</div>
<div class="line"><a class="code" href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95">worksheet_conditional_format_range</a>(worksheet, <a class="code" href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a>(<span class="stringliteral">&quot;A1:A4&quot;</span>), conditional_format);</div>
</div><!-- fragment --><h2><a class="anchor" id="ww_cond_format_type_errors"></a>
type: errors</h2>
<p>The <code>errors</code> type is used to highlight error cells in a range. It doesn't take a criteria:</p>
<div class="fragment"><div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>   = <a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92dadd06584e94945519df4fc2252882e374">LXW_CONDITIONAL_TYPE_ERRORS</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a3d3ca3432272ee4d5172349ae030dfcc">format</a> = format1;</div>
<div class="line"><a class="code" href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95">worksheet_conditional_format_range</a>(worksheet, <a class="code" href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a>(<span class="stringliteral">&quot;A1:A4&quot;</span>), conditional_format);</div>
</div><!-- fragment --><h2><a class="anchor" id="ww_cond_format_type_no_errors"></a>
type: no_errors</h2>
<p>The <code>no_errors</code> type is used to highlight non error cells in a range. It doesn't take a criteria:</p>
<div class="fragment"><div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>   = <a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92da70562e7676d45e65a932623728250058">LXW_CONDITIONAL_TYPE_NO_ERRORS</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a3d3ca3432272ee4d5172349ae030dfcc">format</a> = format1;</div>
<div class="line"><a class="code" href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95">worksheet_conditional_format_range</a>(worksheet, <a class="code" href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a>(<span class="stringliteral">&quot;A1:A4&quot;</span>), conditional_format);</div>
</div><!-- fragment --><h2><a class="anchor" id="ww_cond_format_type_formula"></a>
type: formula</h2>
<p>The <code>formula</code> type is used to specify a conditional format based on a user defined formula:</p>
<div class="fragment"><div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>         = <a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92da970b8654514d6525221bc71da66c5550">LXW_CONDITIONAL_TYPE_FORMULA</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad09997b3e8aa12dba5617739c8839e7d">value_string</a> = <span class="stringliteral">&quot;=$A$1&gt;5&quot;</span>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a3d3ca3432272ee4d5172349ae030dfcc">format</a>       = format1;</div>
<div class="line"><a class="code" href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95">worksheet_conditional_format_range</a>(worksheet, <a class="code" href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a>(<span class="stringliteral">&quot;A1:A4&quot;</span>), conditional_format);</div>
<div class="line"> </div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>         = <a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92da970b8654514d6525221bc71da66c5550">LXW_CONDITIONAL_TYPE_FORMULA</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad09997b3e8aa12dba5617739c8839e7d">value_string</a> = <span class="stringliteral">&quot;=$A$2&lt;80&quot;</span>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a3d3ca3432272ee4d5172349ae030dfcc">format</a>       = format2;</div>
<div class="line"><a class="code" href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95">worksheet_conditional_format_range</a>(worksheet, <a class="code" href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a>(<span class="stringliteral">&quot;B1:B4&quot;</span>), conditional_format);</div>
<div class="line"> </div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>         = <a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92da970b8654514d6525221bc71da66c5550">LXW_CONDITIONAL_TYPE_FORMULA</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad09997b3e8aa12dba5617739c8839e7d">value_string</a> = <span class="stringliteral">&quot;=$A$3&gt;$A$4&quot;</span>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a3d3ca3432272ee4d5172349ae030dfcc">format</a>       = format3;</div>
<div class="line"><a class="code" href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95">worksheet_conditional_format_range</a>(worksheet, <a class="code" href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a>(<span class="stringliteral">&quot;C1:C4&quot;</span>), conditional_format);</div>
</div><!-- fragment --><p>Formulas must be written with the US style separator/range operator which is a comma (not semi-colon) and should follow the same rules as <code><a class="el" href="worksheet_8h.html#ae57117f04c82bef29805ec3eabc219bb" title="Write a formula to a worksheet cell.">worksheet_write_formula()</a></code>. See <a class="el" href="working_with_formulas.html#ww_formulas_non_us">Non US Excel functions and syntax</a> for a full explanation:</p>
<div class="fragment"><div class="line"><span class="comment">// This formula will cause an Excel error on load due to non-English</span></div>
<div class="line"><span class="comment">// language and use of semi-colons.</span></div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>         = <a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92da970b8654514d6525221bc71da66c5550">LXW_CONDITIONAL_TYPE_FORMULA</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad09997b3e8aa12dba5617739c8839e7d">value_string</a> = <span class="stringliteral">&quot;=ODER($B2&lt;$C2;UND($B2=&quot;</span><span class="stringliteral">&quot;;$C2&gt;HEUTE()))&quot;</span>;</div>
<div class="line"> </div>
<div class="line"><span class="comment">// This is the correct syntax.</span></div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>         = <a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92da970b8654514d6525221bc71da66c5550">LXW_CONDITIONAL_TYPE_FORMULA</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad09997b3e8aa12dba5617739c8839e7d">value_string</a> = <span class="stringliteral">&quot;=OR($B2&lt;$C2,AND($B2=&quot;</span><span class="stringliteral">&quot;,$C2&gt;TODAY()))&quot;</span>;</div>
</div><!-- fragment --><dl class="section note"><dt>Note</dt><dd>Conditional formatting formulas require some knowledge of how cell references work in Excel. For example the formulas <code>"$A$1=5"</code> and <code>"A1=5"</code> will give different results when applied to a range. It is best to verify the formula in Excel before transferring it to libxlsxwriter.</dd></dl>
<h2><a class="anchor" id="ww_cond_format_type_2_color_scale"></a>
type: 2_color_scale</h2>
<p>The <code>2_color_scale</code> type is used to specify Excel's "2 Color Scale" style conditional format:</p>
<div class="fragment"><div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>   = <a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92da073422bf8a6df5ddbabb3763aa7b27d8">LXW_CONDITIONAL_2_COLOR_SCALE</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a3d3ca3432272ee4d5172349ae030dfcc">format</a> = format1;</div>
<div class="line"><a class="code" href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95">worksheet_conditional_format_range</a>(worksheet, <a class="code" href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a>(<span class="stringliteral">&quot;A1:A12&quot;</span>), conditional_format);</div>
</div><!-- fragment --><div class="image">
<img src="conditional_format4.png" alt=""/>
</div>
<p>This conditional type can be modified with additional parameters:</p>
<div class="fragment"><div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>          = <a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92da073422bf8a6df5ddbabb3763aa7b27d8">LXW_CONDITIONAL_2_COLOR_SCALE</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#aedf2517dee1d1aac4e963dc315879b62">min_rule_type</a> = <a class="code" href="worksheet_8h.html#aa1c8a0821648b21a1483d743587bb8eba568c6fe29a89937e792464b59d7f0f93">LXW_CONDITIONAL_RULE_TYPE_NUMBER</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#af473b5134c8851ad6e8e32b8e96e125a">max_rule_type</a> = <a class="code" href="worksheet_8h.html#aa1c8a0821648b21a1483d743587bb8eba568c6fe29a89937e792464b59d7f0f93">LXW_CONDITIONAL_RULE_TYPE_NUMBER</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#af8b4013a50ba2a58fa009dc22dcb9db8">min_value</a>     = 20;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a18ce2238c9d2c51b79e9c9206c892a2c">max_value</a>     = 80;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ab800fddf49071afb1ce9f020d44b2b3c">min_color</a>     = 0xFF7128;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a6d4a5eb20238f46f2fc594f1a5e1bc33">max_color</a>     = 0xFFEF9C;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a3d3ca3432272ee4d5172349ae030dfcc">format</a>        = format1;</div>
</div><!-- fragment --><p>See the following sections below for more information:</p>
<ul>
<li><a class="el" href="working_with_conditional_formatting.html#ww_cond_format_min_value">parameter: min_value and min_value_string</a></li>
<li><a class="el" href="working_with_conditional_formatting.html#ww_cond_format_max_value">parameter: max_value and max_value_string</a></li>
<li><a class="el" href="working_with_conditional_formatting.html#ww_cond_format_min_rule_type">parameter: min_rule_type</a></li>
<li><a class="el" href="working_with_conditional_formatting.html#ww_cond_format_max_rule_type">parameter: max_rule_type</a></li>
<li><a class="el" href="working_with_conditional_formatting.html#ww_cond_format_min_color">parameter: min_color</a></li>
<li><a class="el" href="working_with_conditional_formatting.html#ww_cond_format_max_color">parameter: max_color</a></li>
</ul>
<h2><a class="anchor" id="ww_cond_format_type_3_color_scale"></a>
type: 3_color_scale</h2>
<p>The <code>3_color_scale</code> type is used to specify Excel's "3 Color Scale" style conditional format:</p>
<div class="fragment"><div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>   = <a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92da95e1b05b230b8964f78d676d0b114ed2">LXW_CONDITIONAL_3_COLOR_SCALE</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a3d3ca3432272ee4d5172349ae030dfcc">format</a> = format1;</div>
<div class="line"><a class="code" href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95">worksheet_conditional_format_range</a>(worksheet, <a class="code" href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a>(<span class="stringliteral">&quot;A1:A12&quot;</span>), conditional_format);</div>
</div><!-- fragment --><p>This conditional type can be modified with additional parameters:</p>
<div class="fragment"><div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>          = <a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92da95e1b05b230b8964f78d676d0b114ed2">LXW_CONDITIONAL_3_COLOR_SCALE</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#af8b4013a50ba2a58fa009dc22dcb9db8">min_value</a>     = 10;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ae05120a2be801d037bed0abe8a71de40">mid_value</a>     = 52;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a18ce2238c9d2c51b79e9c9206c892a2c">max_value</a>     = 99;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#aedf2517dee1d1aac4e963dc315879b62">min_rule_type</a> = <a class="code" href="worksheet_8h.html#aa1c8a0821648b21a1483d743587bb8eba568c6fe29a89937e792464b59d7f0f93">LXW_CONDITIONAL_RULE_TYPE_NUMBER</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a0b3dd44b45e5cc5c49be1817aa873b04">mid_rule_type</a> = <a class="code" href="worksheet_8h.html#aa1c8a0821648b21a1483d743587bb8eba797bc688aec003e9ca84c49b52880f68">LXW_CONDITIONAL_RULE_TYPE_PERCENT</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#af473b5134c8851ad6e8e32b8e96e125a">max_rule_type</a> = <a class="code" href="worksheet_8h.html#aa1c8a0821648b21a1483d743587bb8eba4c42f493acf1bc058cfb3fe7fe439d48">LXW_CONDITIONAL_RULE_TYPE_PERCENTILE</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ab800fddf49071afb1ce9f020d44b2b3c">min_color</a>     = 0xC5D9F1;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#af81689ba9f4c8a89b1e32f62054136ad">mid_color</a>     = 0x8DB4E3;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a6d4a5eb20238f46f2fc594f1a5e1bc33">max_color</a>     = 0x538ED5;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a3d3ca3432272ee4d5172349ae030dfcc">format</a>        = format1;</div>
</div><!-- fragment --><p>See the following sections below for more information:</p>
<ul>
<li><a class="el" href="working_with_conditional_formatting.html#ww_cond_format_min_value">parameter: min_value and min_value_string</a></li>
<li><a class="el" href="working_with_conditional_formatting.html#ww_cond_format_mid_value">parameter: mid_value and mid_value_string</a></li>
<li><a class="el" href="working_with_conditional_formatting.html#ww_cond_format_max_value">parameter: max_value and max_value_string</a></li>
<li><a class="el" href="working_with_conditional_formatting.html#ww_cond_format_min_rule_type">parameter: min_rule_type</a></li>
<li><a class="el" href="working_with_conditional_formatting.html#ww_cond_format_mid_rule_type">parameter: mid_rule_type</a></li>
<li><a class="el" href="working_with_conditional_formatting.html#ww_cond_format_max_rule_type">parameter: max_rule_type</a></li>
<li><a class="el" href="working_with_conditional_formatting.html#ww_cond_format_min_color">parameter: min_color</a></li>
<li><a class="el" href="working_with_conditional_formatting.html#ww_cond_format_mid_color">parameter: mid_color</a></li>
<li><a class="el" href="working_with_conditional_formatting.html#ww_cond_format_max_color">parameter: max_color</a></li>
</ul>
<h2><a class="anchor" id="ww_cond_format_type_data_bar"></a>
type: data_bar</h2>
<p>The <code>data_bar</code> type is used to specify Excel's "Data Bar" style conditional format:</p>
<div class="fragment"><div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>   = <a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92dae0c88a53343690c1f43385b466dfe45e">LXW_CONDITIONAL_DATA_BAR</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a3d3ca3432272ee4d5172349ae030dfcc">format</a> = format1;</div>
<div class="line"><a class="code" href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95">worksheet_conditional_format_range</a>(worksheet, <a class="code" href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a>(<span class="stringliteral">&quot;A1:A12&quot;</span>), conditional_format);</div>
</div><!-- fragment --><div class="image">
<img src="conditional_format7.png" alt=""/>
</div>
<p>This conditional type can be modified with the following parameters, which are explained in the sections below. These properties were available in the original xlsx file specification used in Excel 2007:</p>
<ul>
<li><a class="el" href="working_with_conditional_formatting.html#ww_cond_format_min_value">parameter: min_value and min_value_string</a></li>
<li><a class="el" href="working_with_conditional_formatting.html#ww_cond_format_max_value">parameter: max_value and max_value_string</a></li>
<li><a class="el" href="working_with_conditional_formatting.html#ww_cond_format_min_rule_type">parameter: min_rule_type</a></li>
<li><a class="el" href="working_with_conditional_formatting.html#ww_cond_format_max_rule_type">parameter: max_rule_type</a></li>
<li><a class="el" href="working_with_conditional_formatting.html#ww_cond_format_bar_color">parameter: bar_color</a></li>
<li><a class="el" href="working_with_conditional_formatting.html#ww_cond_format_bar_only">parameter: bar_only</a></li>
</ul>
<p>Additional data bar properties were added in Excel 2010 such as solid (non-gradient) bars and control over how negative values are displayed. These properties can be set using the following parameters:</p>
<ul>
<li><a class="el" href="working_with_conditional_formatting.html#ww_cond_format_bar_solid">parameter: bar_solid</a></li>
<li><a class="el" href="working_with_conditional_formatting.html#ww_cond_format_bar_negative_color">parameter: bar_negative_color</a></li>
<li><a class="el" href="working_with_conditional_formatting.html#ww_cond_format_bar_border_color">parameter: bar_border_color</a></li>
<li><a class="el" href="working_with_conditional_formatting.html#ww_cond_format_bar_negative_border_color">parameter: bar_negative_border_color</a></li>
<li><a class="el" href="working_with_conditional_formatting.html#ww_cond_format_bar_negative_color_same">parameter: bar_negative_color_same</a></li>
<li><a class="el" href="working_with_conditional_formatting.html#ww_cond_format_bar_negative_border_color_same">parameter: bar_negative_border_color_same</a></li>
<li><a class="el" href="working_with_conditional_formatting.html#ww_cond_format_bar_no_border">parameter: bar_no_border</a></li>
<li><a class="el" href="working_with_conditional_formatting.html#ww_cond_format_bar_direction">parameter: bar_direction</a></li>
<li><a class="el" href="working_with_conditional_formatting.html#ww_cond_format_bar_axis_position">parameter: bar_axis_position</a></li>
<li><a class="el" href="working_with_conditional_formatting.html#ww_cond_format_bar_axis_color">parameter: bar_axis_color</a></li>
<li><a class="el" href="working_with_conditional_formatting.html#ww_cond_format_data_bar_2010">parameter: data_bar_2010</a></li>
</ul>
<p>For example:</p>
<div class="image">
<img src="conditional_format6.png" alt=""/>
</div>
<p>Files that use these Excel 2010 properties can still be opened in Excel 2007 but the data bars will be displayed without them.</p>
<h2><a class="anchor" id="ww_cond_format_type_icon_set"></a>
type: icon_set</h2>
<p>The <code>icon_set</code> type is used to specify a conditional format with a set of icons such as traffic lights or arrows:</p>
<div class="fragment"><div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>       = <a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92dad29f06d444d5d900d076551cf057eee5">LXW_CONDITIONAL_TYPE_ICON_SETS</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a0cf9351bf7eb8bdfddb988ca9c24f308">icon_style</a> = <a class="code" href="worksheet_8h.html#aaeb0374167b23080c63eccac2a64840ba2a85edc11a29e1ed4ef360b758c4fa58">LXW_CONDITIONAL_ICONS_3_ARROWS_COLORED</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a3d3ca3432272ee4d5172349ae030dfcc">format</a>     = format1;</div>
<div class="line"><a class="code" href="worksheet_8h.html#a171180f46f54aa816c2b3c6c8688ab17">worksheet_conditional_format_cell</a>(worksheet, <a class="code" href="utility_8h.html#ad510ac6df573d23203374e24dba373d2">CELL</a>(<span class="stringliteral">&quot;A1&quot;</span>), conditional_format);</div>
</div><!-- fragment --><p>The icon set style is specified by the <code>icon_style</code> parameter. Valid options are:</p>
<ul>
<li><a class="el" href="worksheet_8h.html#aaeb0374167b23080c63eccac2a64840ba2a85edc11a29e1ed4ef360b758c4fa58">LXW_CONDITIONAL_ICONS_3_ARROWS_COLORED</a>: Icon style: 3 colored arrows showing up, sideways and down.</li>
<li><a class="el" href="worksheet_8h.html#aaeb0374167b23080c63eccac2a64840ba77987e3dbf3db5affcf27d7795f803f4">LXW_CONDITIONAL_ICONS_3_ARROWS_GRAY</a>: Icon style: 3 gray arrows showing up, sideways and down.</li>
<li><a class="el" href="worksheet_8h.html#aaeb0374167b23080c63eccac2a64840ba28d0971bdd685c184a02fdba9d13365a">LXW_CONDITIONAL_ICONS_3_FLAGS</a>: Icon style: 3 colored flags in red, yellow and green.</li>
<li><a class="el" href="worksheet_8h.html#aaeb0374167b23080c63eccac2a64840ba24f085582f0fe3e87f99686d090c45ca">LXW_CONDITIONAL_ICONS_3_TRAFFIC_LIGHTS_UNRIMMED</a>: Icon style: 3 traffic lights - rounded.</li>
<li><a class="el" href="worksheet_8h.html#aaeb0374167b23080c63eccac2a64840baa77f39bba5103bee55b112ae958b8fed">LXW_CONDITIONAL_ICONS_3_TRAFFIC_LIGHTS_RIMMED</a>: Icon style: 3 traffic lights with a rim - squarish.</li>
<li><a class="el" href="worksheet_8h.html#aaeb0374167b23080c63eccac2a64840ba455ff03a2d12d85ddf5fc8572ee151d0">LXW_CONDITIONAL_ICONS_3_SIGNS</a>: Icon style: 3 colored shapes - a circle, triangle and diamond.</li>
<li><a class="el" href="worksheet_8h.html#aaeb0374167b23080c63eccac2a64840ba8baa0f98d3771c07f83fc4d10a6db870">LXW_CONDITIONAL_ICONS_3_SYMBOLS_CIRCLED</a>: Icon style: 3 circled symbols with tick mark, exclamation and cross.</li>
<li><a class="el" href="worksheet_8h.html#aaeb0374167b23080c63eccac2a64840bac4d4e7e8cda8578ad851c2086c233fe1">LXW_CONDITIONAL_ICONS_3_SYMBOLS_UNCIRCLED</a>: Icon style: 3 symbols with tick mark, exclamation and cross.</li>
<li><a class="el" href="worksheet_8h.html#aaeb0374167b23080c63eccac2a64840ba0f081e87021b94c85c5f513bee20cefc">LXW_CONDITIONAL_ICONS_4_ARROWS_COLORED</a>: Icon style: 3 colored arrows showing up, diagonal up, diagonal down and down.</li>
<li><a class="el" href="worksheet_8h.html#aaeb0374167b23080c63eccac2a64840ba31dcd78a47ab9c51a775d424ff125b75">LXW_CONDITIONAL_ICONS_4_ARROWS_GRAY</a>: Icon style: 3 gray arrows showing up, diagonal up, diagonal down and down.</li>
<li><a class="el" href="worksheet_8h.html#aaeb0374167b23080c63eccac2a64840ba780b3f28f5c9b6a51c3da515bc09d698">LXW_CONDITIONAL_ICONS_4_RED_TO_BLACK</a>: Icon style: 4 circles in 4 colors going from red to black.</li>
<li><a class="el" href="worksheet_8h.html#aaeb0374167b23080c63eccac2a64840bab814d3cdca3479db41dec59ccf3659c4">LXW_CONDITIONAL_ICONS_4_RATINGS</a>: Icon style: 4 histogram ratings.</li>
<li><a class="el" href="worksheet_8h.html#aaeb0374167b23080c63eccac2a64840bac49a620b3ce04826bb4bfe1faa8cb20b">LXW_CONDITIONAL_ICONS_4_TRAFFIC_LIGHTS</a>: Icon style: 4 traffic lights.</li>
<li><a class="el" href="worksheet_8h.html#aaeb0374167b23080c63eccac2a64840ba20cf7c4a18ecd5aa81b5f1e3887d3c3f">LXW_CONDITIONAL_ICONS_5_ARROWS_COLORED</a>: Icon style: 5 colored arrows showing up, diagonal up, sideways, diagonal down and down.</li>
<li><a class="el" href="worksheet_8h.html#aaeb0374167b23080c63eccac2a64840ba88cd70a2ecb36a92e5f0c96c8e2bab71">LXW_CONDITIONAL_ICONS_5_ARROWS_GRAY</a>: Icon style: 5 gray arrows showing up, diagonal up, sideways, diagonal down and down.</li>
<li><a class="el" href="worksheet_8h.html#aaeb0374167b23080c63eccac2a64840baf492caa7c54d3c2303666083bba40662">LXW_CONDITIONAL_ICONS_5_RATINGS</a>: Icon style: 5 histogram ratings.</li>
<li><a class="el" href="worksheet_8h.html#aaeb0374167b23080c63eccac2a64840ba31f0fe48d54fa205abfa0a7d88ca102d">LXW_CONDITIONAL_ICONS_5_QUARTERS</a>: Icon style: 5 quarters, from 0 to 4 quadrants filled.</li>
</ul>
<div class="image">
<img src="conditional_format5.png" alt=""/>
</div>
<p>The order of Icon Sets icons can be reversed by setting reverse_icons to LXW_TRUE.</p>
<div class="fragment"><div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>          = <a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92dad29f06d444d5d900d076551cf057eee5">LXW_CONDITIONAL_TYPE_ICON_SETS</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a0cf9351bf7eb8bdfddb988ca9c24f308">icon_style</a>    = <a class="code" href="worksheet_8h.html#aaeb0374167b23080c63eccac2a64840ba24f085582f0fe3e87f99686d090c45ca">LXW_CONDITIONAL_ICONS_3_TRAFFIC_LIGHTS_UNRIMMED</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#aac7b01a937ca3203030ddbe8d34d54de">reverse_icons</a> = <a class="code" href="common_8h.html#a57bffaf0ff3cb4e9f4f7f2b0b6dad349a7850bcc34c18efe2e45372f4069be0bf">LXW_TRUE</a>;</div>
<div class="line"><a class="code" href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95">worksheet_conditional_format_range</a>(worksheet, <a class="code" href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a>(<span class="stringliteral">&quot;B4:D4&quot;</span>), conditional_format);</div>
<div class="line">reset_conditional_format(conditional_format);</div>
</div><!-- fragment --><p>The icons can be displayed without the cell value by settings the icons_only parameter to LXW_TRUE:</p>
<div class="fragment"><div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>       = <a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92dad29f06d444d5d900d076551cf057eee5">LXW_CONDITIONAL_TYPE_ICON_SETS</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a0cf9351bf7eb8bdfddb988ca9c24f308">icon_style</a> = <a class="code" href="worksheet_8h.html#aaeb0374167b23080c63eccac2a64840ba24f085582f0fe3e87f99686d090c45ca">LXW_CONDITIONAL_ICONS_3_TRAFFIC_LIGHTS_UNRIMMED</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ae7dce71531b0b265f88577b008368d96">icons_only</a> = <a class="code" href="common_8h.html#a57bffaf0ff3cb4e9f4f7f2b0b6dad349a7850bcc34c18efe2e45372f4069be0bf">LXW_TRUE</a>;</div>
<div class="line"><a class="code" href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95">worksheet_conditional_format_range</a>(worksheet, <a class="code" href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a>(<span class="stringliteral">&quot;B5:D5&quot;</span>), conditional_format);</div>
<div class="line">reset_conditional_format(conditional_format);</div>
</div><!-- fragment --><h1><a class="anchor" id="ww_cond_format_other_properties"></a>
Conditional Format Parameters</h1>
<p>The fields/options in the the <a class="el" href="structlxw__conditional__format.html" title="Worksheet conditional formatting options.">lxw_conditional_format</a> are used to define a worksheet conditional format. The <code>type</code> field was explained in the previous section. The sections below explain the other options.</p>
<h2><a class="anchor" id="ww_cond_format_criteria"></a>
parameter: criteria</h2>
<p>The <code>criteria</code> parameter is used to set the criteria by which the cell data will be evaluated. It is defined in <a class="el" href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6b" title="The criteria used in a conditional format.">lxw_conditional_criteria</a> and has no default value. Some conditional format types such as <code>duplicate</code> or <code>blanks</code> don't need to specify as criteria since it is implicit in the type.</p>
<p>The values for different conditional format types are shown in <a class="el" href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6b" title="The criteria used in a conditional format.">lxw_conditional_criteria</a> and in the <code>type</code> sections to which they apply, above.</p>
<h2><a class="anchor" id="ww_cond_format_value"></a>
parameter: value and value_string</h2>
<p>The <code>value</code> parameter is generally used along with <code>criteria</code> to set the rule by which the cell data will be evaluated:</p>
<div class="fragment"><div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a06fc7b5549574bac769cf93ae7180e3f">criteria</a>     = <a class="code" href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6ba70fa69c881508f2643929964ba0c2816">LXW_CONDITIONAL_CRITERIA_EQUAL_TO</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#aa11acc4f64d532fafc7cda9a98dc1fc9">value</a>        = 10;</div>
</div><!-- fragment --><p>The <code>value_string</code> parameter is used for non-numeric values. In conditional formats this will generally be a cell reference like the following:</p>
<div class="fragment"><div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a06fc7b5549574bac769cf93ae7180e3f">criteria</a>     = <a class="code" href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6ba70fa69c881508f2643929964ba0c2816">LXW_CONDITIONAL_CRITERIA_EQUAL_TO</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad09997b3e8aa12dba5617739c8839e7d">value_string</a> = <span class="stringliteral">&quot;$B$1&quot;</span>;</div>
<div class="line"> </div>
<div class="line"><span class="comment">// Or like this.</span></div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad09997b3e8aa12dba5617739c8839e7d">value_string</a> = <span class="stringliteral">&quot;=$B$1&quot;</span>;</div>
</div><!-- fragment --><p>In general any <code>value_string</code> property that refers to a cell reference should use an absolute cell reference, like <code>$B$1</code>, especially if the conditional formatting is applied to a range of values. Without an absolute cell reference the conditional format will not be applied correctly by Excel, apart from the first cell in the formatted range. Double check in Excel if you don't get the result that you expect.</p>
<p>If the <code>type</code> is Cell, the <code>criteria</code> is "equal to" and the <code>value_string</code> is a text string (but not a cell range) then Excel requires that the text string is double quoted:</p>
<div class="fragment"><div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a06fc7b5549574bac769cf93ae7180e3f">criteria</a>     = <a class="code" href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6ba70fa69c881508f2643929964ba0c2816">LXW_CONDITIONAL_CRITERIA_EQUAL_TO</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad09997b3e8aa12dba5617739c8839e7d">value_string</a> = <span class="stringliteral">&quot;\&quot;string to match\&quot;&quot;</span>;</div>
</div><!-- fragment --><h2><a class="anchor" id="ww_cond_format_format"></a>
parameter: format</h2>
<p>The <code>format</code> parameter is used to specify the format that will be applied to the cell when the conditional formatting criterion is met. The format is created using the <code><a class="el" href="workbook_8h.html#a279a5d7075d09a3931aae9782afede33" title="Create a new Format object to formats cells in worksheets.">workbook_add_format()</a></code> function in the same way as cell formats:</p>
<div class="fragment"><div class="line"><a class="code" href="structlxw__format.html">lxw_format</a> *format = <a class="code" href="workbook_8h.html#a279a5d7075d09a3931aae9782afede33">workbook_add_format</a>(workbook);</div>
<div class="line"><a class="code" href="format_8h.html#a85e1b0baf44b445b65894e48722aec14">format_set_bold</a>(format);</div>
<div class="line"><a class="code" href="format_8h.html#a19cbd7c34692eb7fb35a7411432d836e">format_set_italic</a>(format);</div>
<div class="line"> </div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>     = <a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92dac9180feb375f5d9302d80467398a0c6e">LXW_CONDITIONAL_TYPE_CELL</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a06fc7b5549574bac769cf93ae7180e3f">criteria</a> = <a class="code" href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6ba10ffa392949de59161307149c55a971b">LXW_CONDITIONAL_CRITERIA_GREATER_THAN</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#aa11acc4f64d532fafc7cda9a98dc1fc9">value</a>    = 20;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a3d3ca3432272ee4d5172349ae030dfcc">format</a>   = format;</div>
</div><!-- fragment --><p>Most conditional formats will have a <a class="el" href="structlxw__format.html" title="Struct to represent the formatting properties of an Excel format.">lxw_format</a> <code>format</code>, since that is somewhat the point. However, it isn't actually required, in Excel or in libxlsxwriter. Color Scale and Data Bar conditional format types use defined colors instead of a format.</p>
<dl class="section note"><dt>Note</dt><dd></dd></dl>
<p>In Excel, a conditional format is superimposed over the existing cell format and <b>not all cell format properties can be modified in a conditional format</b>. Properties that cannot be modified in a conditional format in Excel are: font name, font size, superscript and subscript, diagonal borders, all alignment properties and all protection properties.</p>
<p>Excel specifies some default formats when using the conditional formatting dialog such as red, yellow and green. These can be replicated using the following libxlsxwriter formats:</p>
<div class="fragment"><div class="line"><span class="comment">// Light red fill with dark red text.</span></div>
<div class="line"><a class="code" href="structlxw__format.html">lxw_format</a> *format1 = <a class="code" href="workbook_8h.html#a279a5d7075d09a3931aae9782afede33">workbook_add_format</a>(workbook);</div>
<div class="line"><a class="code" href="format_8h.html#aeef47436c335daf1801683ac7b3b587d">format_set_bg_color</a>(  format1, 0xFFC7CE);</div>
<div class="line"><a class="code" href="format_8h.html#a61981b2080bfe6381ede5358ee05b05c">format_set_font_color</a>(format1, 0x9C0006);</div>
<div class="line"> </div>
<div class="line"><span class="comment">// Light yellow fill with dark yellow text.</span></div>
<div class="line"><a class="code" href="structlxw__format.html">lxw_format</a> *format2 = <a class="code" href="workbook_8h.html#a279a5d7075d09a3931aae9782afede33">workbook_add_format</a>(workbook);</div>
<div class="line"><a class="code" href="format_8h.html#aeef47436c335daf1801683ac7b3b587d">format_set_bg_color</a>(  format2, 0xFFEB9C);</div>
<div class="line"><a class="code" href="format_8h.html#a61981b2080bfe6381ede5358ee05b05c">format_set_font_color</a>(format2, 0x9C6500);</div>
<div class="line"> </div>
<div class="line"><span class="comment">// Green fill with dark green text.</span></div>
<div class="line"><a class="code" href="structlxw__format.html">lxw_format</a> *format3 = <a class="code" href="workbook_8h.html#a279a5d7075d09a3931aae9782afede33">workbook_add_format</a>(workbook);</div>
<div class="line"><a class="code" href="format_8h.html#aeef47436c335daf1801683ac7b3b587d">format_set_bg_color</a>(  format3, 0xC6EFCE);</div>
<div class="line"><a class="code" href="format_8h.html#a61981b2080bfe6381ede5358ee05b05c">format_set_font_color</a>(format3, 0x006100);</div>
</div><!-- fragment --><p>See also <a class="el" href="structlxw__format.html" title="Struct to represent the formatting properties of an Excel format.">lxw_format</a> and <a class="el" href="working_with_formats.html">Working with Formats</a>.</p>
<h2><a class="anchor" id="ww_cond_format_min_value"></a>
parameter: min_value and min_value_string</h2>
<p>The <code>min_value</code> parameter is used to set the lower limiting value for Cell, Color Scale and Data Bar conditional formats.</p>
<p>For cell formats it is usually used when the <code>criteria</code> is either <a class="el" href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6ba085943843b38880c58d2af4cd5e85c94">LXW_CONDITIONAL_CRITERIA_BETWEEN</a> or <a class="el" href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6ba1bf47932d37f00e5585273f0f6759075">LXW_CONDITIONAL_CRITERIA_NOT_BETWEEN</a>:</p>
<div class="fragment"><div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>      = <a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92dac9180feb375f5d9302d80467398a0c6e">LXW_CONDITIONAL_TYPE_CELL</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a06fc7b5549574bac769cf93ae7180e3f">criteria</a>  = <a class="code" href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6ba085943843b38880c58d2af4cd5e85c94">LXW_CONDITIONAL_CRITERIA_BETWEEN</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#af8b4013a50ba2a58fa009dc22dcb9db8">min_value</a> = 2;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a18ce2238c9d2c51b79e9c9206c892a2c">max_value</a> = 6;</div>
</div><!-- fragment --><p>The <code>min_value_string</code> parameter is used for non-numeric values. In conditional formats this will generally be a cell reference like <code>$B$1</code>:</p>
<div class="fragment"><div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>             = <a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92dac9180feb375f5d9302d80467398a0c6e">LXW_CONDITIONAL_TYPE_CELL</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a06fc7b5549574bac769cf93ae7180e3f">criteria</a>         = <a class="code" href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6ba085943843b38880c58d2af4cd5e85c94">LXW_CONDITIONAL_CRITERIA_BETWEEN</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a171ca24363807d7071d7044f9586a481">min_value_string</a> = <span class="stringliteral">&quot;$B$1;</span></div>
<div class="line"><span class="stringliteral">conditional_format-&gt;max_value_string = &quot;</span>$B$2<span class="stringliteral">&quot;;</span></div>
</div><!-- fragment --><h2><a class="anchor" id="ww_cond_format_mid_value"></a>
parameter: mid_value and mid_value_string</h2>
<p>The <code>mid_value</code> parameter is used to set the middle limit for Color Scale and Data Bar conditional formats.</p>
<p>See <a class="el" href="working_with_conditional_formatting.html#ww_cond_format_min_value">parameter: min_value and min_value_string</a> above.</p>
<h2><a class="anchor" id="ww_cond_format_max_value"></a>
parameter: max_value and max_value_string</h2>
<p>The <code>max_value</code> parameter is used to set the lower limiting value for Cell, Color Scale and Data Bar conditional formats.</p>
<p>See <a class="el" href="working_with_conditional_formatting.html#ww_cond_format_min_value">parameter: min_value and min_value_string</a> above.</p>
<h2><a class="anchor" id="ww_cond_format_min_rule_type"></a>
parameter: min_rule_type</h2>
<p>The <code>min_rule_type</code> and <code>max_rule_type</code> properties are used when the conditional formatting type is <code>2_color_scale</code>, <code>3_color_scale</code> or <code>data_bar</code>. The <code>mid_rule_type</code> is used with <code>3_color_scale</code>. The properties are used as follows:</p>
<div class="fragment"><div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>          = <a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92da073422bf8a6df5ddbabb3763aa7b27d8">LXW_CONDITIONAL_2_COLOR_SCALE</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#aedf2517dee1d1aac4e963dc315879b62">min_rule_type</a> = <a class="code" href="worksheet_8h.html#aa1c8a0821648b21a1483d743587bb8eba797bc688aec003e9ca84c49b52880f68">LXW_CONDITIONAL_RULE_TYPE_PERCENT</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#af473b5134c8851ad6e8e32b8e96e125a">max_rule_type</a> = <a class="code" href="worksheet_8h.html#aa1c8a0821648b21a1483d743587bb8eba797bc688aec003e9ca84c49b52880f68">LXW_CONDITIONAL_RULE_TYPE_PERCENT</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#af8b4013a50ba2a58fa009dc22dcb9db8">min_value</a>     = 20;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a18ce2238c9d2c51b79e9c9206c892a2c">max_value</a>     = 80;</div>
<div class="line"><a class="code" href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95">worksheet_conditional_format_range</a>(worksheet, <a class="code" href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a>(<span class="stringliteral">&quot;A1:A12&quot;</span>), conditional_format);</div>
</div><!-- fragment --><p>The available min/mid/max rule types are defined in <a class="el" href="worksheet_8h.html#aa1c8a0821648b21a1483d743587bb8eb" title="Conditional format rule types.">lxw_conditional_format_rule_types</a>:</p>
<ul>
<li><a class="el" href="worksheet_8h.html#aa1c8a0821648b21a1483d743587bb8eba70b727630662807963f9da7bc3d2b687">LXW_CONDITIONAL_RULE_TYPE_MINIMUM</a>: Conditional format rule type: matches the minimum values in the range. Can only be applied to min_rule_type.</li>
<li><a class="el" href="worksheet_8h.html#aa1c8a0821648b21a1483d743587bb8eba568c6fe29a89937e792464b59d7f0f93">LXW_CONDITIONAL_RULE_TYPE_NUMBER</a>: Conditional format rule type: use a number to set the bound.</li>
<li><a class="el" href="worksheet_8h.html#aa1c8a0821648b21a1483d743587bb8eba797bc688aec003e9ca84c49b52880f68">LXW_CONDITIONAL_RULE_TYPE_PERCENT</a>: Conditional format rule type: use a percentage to set the bound.</li>
<li><a class="el" href="worksheet_8h.html#aa1c8a0821648b21a1483d743587bb8eba4c42f493acf1bc058cfb3fe7fe439d48">LXW_CONDITIONAL_RULE_TYPE_PERCENTILE</a>: Conditional format rule type: use a percentile to set the bound.</li>
<li><a class="el" href="worksheet_8h.html#aa1c8a0821648b21a1483d743587bb8eba959bb3cdccd2cec2abc92bbd6fc39e53">LXW_CONDITIONAL_RULE_TYPE_FORMULA</a>: Conditional format rule type: use a formula to set the bound.</li>
<li><a class="el" href="worksheet_8h.html#aa1c8a0821648b21a1483d743587bb8eba5946b0790ccd180983350a8d98fe5adf">LXW_CONDITIONAL_RULE_TYPE_MAXIMUM</a>: Conditional format rule type: matches the maximum values in the range. Can only be applied to max_rule_type.</li>
</ul>
<h2><a class="anchor" id="ww_cond_format_mid_rule_type"></a>
parameter: mid_rule_type</h2>
<p>Used for <code>3_color_scale</code>. Same as <code>min_rule_type</code>, see above.</p>
<h2><a class="anchor" id="ww_cond_format_max_rule_type"></a>
parameter: max_rule_type</h2>
<p>Same as <code>min_rule_type</code>, see above.</p>
<h2><a class="anchor" id="ww_cond_format_min_color"></a>
parameter: min_color</h2>
<p>The <code>min_color</code> and <code>max_color</code> properties are available when the conditional formatting type is <code>2_color_scale</code> or <code>3_color_scale</code>. The <code>mid_color</code> is available for <code>3_color_scale</code>. The properties are used as follows:</p>
<div class="fragment"><div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>      = <a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92da073422bf8a6df5ddbabb3763aa7b27d8">LXW_CONDITIONAL_2_COLOR_SCALE</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ab800fddf49071afb1ce9f020d44b2b3c">min_color</a> = 0xFF7128;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a6d4a5eb20238f46f2fc594f1a5e1bc33">max_color</a> = 0xFFEF9C;</div>
<div class="line"><a class="code" href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95">worksheet_conditional_format_range</a>(worksheet, <a class="code" href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a>(<span class="stringliteral">&quot;A1:A12&quot;</span>), conditional_format);</div>
</div><!-- fragment --><p>The color can be a Html style <code>RRGGBB</code> hex number or a limited number of named colors, see <a class="el" href="working_with_colors.html">Working with Colors</a>.</p>
<h2><a class="anchor" id="ww_cond_format_mid_color"></a>
parameter: mid_color</h2>
<p>Used for <code>3_color_scale</code>. Same as <code>min_color</code>, see above.</p>
<h2><a class="anchor" id="ww_cond_format_max_color"></a>
parameter: max_color</h2>
<p>Same as <code>min_color</code>, see above.</p>
<h2><a class="anchor" id="ww_cond_format_bar_color"></a>
parameter: bar_color</h2>
<p>The <code>bar_color</code> parameter sets the fill color for data bars:</p>
<div class="fragment"><div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>      = <a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92dae0c88a53343690c1f43385b466dfe45e">LXW_CONDITIONAL_DATA_BAR</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad2dc53f2c1668c926452a27b41fcb640">bar_color</a> = 0x63C384;</div>
</div><!-- fragment --><div class="image">
<img src="conditional_format7.png" alt=""/>
</div>
<p>The color can be a Html style <code>RRGGBB</code> hex number or a limited number of named colors, see <a class="el" href="working_with_colors.html">Working with Colors</a>.</p>
<h2><a class="anchor" id="ww_cond_format_bar_only"></a>
parameter: bar_only</h2>
<p>The <code>bar_only</code> property displays a bar data but not the data in the cells:</p>
<div class="fragment"><div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>     = <a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92dae0c88a53343690c1f43385b466dfe45e">LXW_CONDITIONAL_DATA_BAR</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a208a4c91723db5794041d1b488992619">bar_only</a> = <a class="code" href="common_8h.html#a57bffaf0ff3cb4e9f4f7f2b0b6dad349a7850bcc34c18efe2e45372f4069be0bf">LXW_TRUE</a>;</div>
<div class="line"><a class="code" href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95">worksheet_conditional_format_range</a>(worksheet, <a class="code" href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a>(<span class="stringliteral">&quot;A1:A12&quot;</span>), conditional_format);</div>
</div><!-- fragment --><p>See the image above.</p>
<h2><a class="anchor" id="ww_cond_format_bar_solid"></a>
parameter: bar_solid</h2>
<p>The <code>bar_solid</code> property turns on a solid (non-gradient) fill for data bars:</p>
<div class="fragment"><div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>      = <a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92dae0c88a53343690c1f43385b466dfe45e">LXW_CONDITIONAL_DATA_BAR</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a7f3f95a74f02ab316c38db46b0b8499c">bar_solid</a> = <a class="code" href="common_8h.html#a57bffaf0ff3cb4e9f4f7f2b0b6dad349a7850bcc34c18efe2e45372f4069be0bf">LXW_TRUE</a>;</div>
<div class="line"><a class="code" href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95">worksheet_conditional_format_range</a>(worksheet, <a class="code" href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a>(<span class="stringliteral">&quot;A1:A12&quot;</span>), conditional_format);</div>
</div><!-- fragment --><p>See the image above.</p>
<p>Note, this property is only visible in Excel 2010 and later.</p>
<h2><a class="anchor" id="ww_cond_format_bar_negative_color"></a>
parameter: bar_negative_color</h2>
<p>The <code>bar_negative_color</code> property sets the color fill for the negative portion of a data bar:</p>
<div class="fragment"><div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>               = <a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92dae0c88a53343690c1f43385b466dfe45e">LXW_CONDITIONAL_DATA_BAR</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a1f9a9a9a1840d78f6ac697365bb957bf">bar_negative_color</a> = 0xFFFF00;</div>
<div class="line"><a class="code" href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95">worksheet_conditional_format_range</a>(worksheet, <a class="code" href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a>(<span class="stringliteral">&quot;A3:C3&quot;</span>), conditional_format);</div>
</div><!-- fragment --><p>The color can be a Html style <code>RRGGBB</code> hex number or a limited number of named colors, see <a class="el" href="working_with_colors.html">Working with Colors</a>.</p>
<p>Note, this property is only visible in Excel 2010 and later.</p>
<h2><a class="anchor" id="ww_cond_format_bar_border_color"></a>
parameter: bar_border_color</h2>
<p>The <code>bar_border_color</code> property sets the color for the border line of a data bar:</p>
<div class="fragment"><div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>             = <a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92dae0c88a53343690c1f43385b466dfe45e">LXW_CONDITIONAL_DATA_BAR</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad2dc53f2c1668c926452a27b41fcb640">bar_color</a>        = 0xFF555A;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#afbf602ea1d3d6df8591976c9c62a7cf9">bar_border_color</a> = 0xFF0000;</div>
<div class="line"><a class="code" href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95">worksheet_conditional_format_range</a>(worksheet, <a class="code" href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a>(<span class="stringliteral">&quot;A3:C3&quot;</span>), conditional_format);</div>
</div><!-- fragment --><p>The color can be a Html style <code>RRGGBB</code> hex number or a limited number of named colors, see <a class="el" href="working_with_colors.html">Working with Colors</a>.</p>
<p>Note, this property is only visible in Excel 2010 and later.</p>
<h2><a class="anchor" id="ww_cond_format_bar_negative_border_color"></a>
parameter: bar_negative_border_color</h2>
<p>The <code>bar_negative_border_color</code> property sets the color for the border of the negative portion of a data bar:</p>
<div class="fragment"><div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>                      = <a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92dae0c88a53343690c1f43385b466dfe45e">LXW_CONDITIONAL_DATA_BAR</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a1ee05313ff7e57c5ac48aca6b0ed3034">bar_negative_border_color</a> = 0x92D050;</div>
<div class="line"><a class="code" href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95">worksheet_conditional_format_range</a>(worksheet, <a class="code" href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a>(<span class="stringliteral">&quot;A2:B2&quot;</span>), conditional_format);</div>
</div><!-- fragment --><p>The color can be a Html style <code>RRGGBB</code> hex number or a limited number of named colors, see <a class="el" href="working_with_colors.html">Working with Colors</a>.</p>
<p>Note, this property is only visible in Excel 2010 and later.</p>
<h2><a class="anchor" id="ww_cond_format_bar_negative_color_same"></a>
parameter: bar_negative_color_same</h2>
<p>The <code>bar_negative_color_same</code> property sets the fill color for the negative portion of a data bar to be the same as the fill color for the positive portion of the data bar:</p>
<div class="fragment"><div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>                    = <a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92dae0c88a53343690c1f43385b466dfe45e">LXW_CONDITIONAL_DATA_BAR</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#aa78aa5551b20f92d1d80efc00939005c">bar_negative_color_same</a> = <a class="code" href="common_8h.html#a57bffaf0ff3cb4e9f4f7f2b0b6dad349a7850bcc34c18efe2e45372f4069be0bf">LXW_TRUE</a>;</div>
<div class="line"><a class="code" href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95">worksheet_conditional_format_range</a>(worksheet, <a class="code" href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a>(<span class="stringliteral">&quot;A3:C3&quot;</span>), conditional_format);</div>
</div><!-- fragment --><div class="image">
<img src="conditional_format6.png" alt=""/>
</div>
<p>Note, this property is only visible in Excel 2010 and later.</p>
<h2><a class="anchor" id="ww_cond_format_bar_negative_border_color_same"></a>
parameter: bar_negative_border_color_same</h2>
<p>The <code>bar_negative_border_color_same</code> property sets the border color for the negative portion of a data bar to be the same as the border color for the positive portion of the data bar:</p>
<div class="fragment"><div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>                           = <a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92dae0c88a53343690c1f43385b466dfe45e">LXW_CONDITIONAL_DATA_BAR</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad053eb830063113c9893c04a0a7b4ef4">bar_negative_border_color_same</a> = <a class="code" href="common_8h.html#a57bffaf0ff3cb4e9f4f7f2b0b6dad349a7850bcc34c18efe2e45372f4069be0bf">LXW_TRUE</a>;</div>
<div class="line"><a class="code" href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95">worksheet_conditional_format_range</a>(worksheet, <a class="code" href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a>(<span class="stringliteral">&quot;A3:C3&quot;</span>), conditional_format);</div>
</div><!-- fragment --><p>See the image above.</p>
<p>Note, this property is only visible in Excel 2010 and later.</p>
<h2><a class="anchor" id="ww_cond_format_bar_no_border"></a>
parameter: bar_no_border</h2>
<p>The <code>bar_no_border</code> property turns off the border for data bars:</p>
<div class="fragment"><div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>          = <a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92dae0c88a53343690c1f43385b466dfe45e">LXW_CONDITIONAL_DATA_BAR</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#addb516a5e4872c4dfaafe1718dc9a8a9">bar_no_border</a> = <a class="code" href="common_8h.html#a57bffaf0ff3cb4e9f4f7f2b0b6dad349a7850bcc34c18efe2e45372f4069be0bf">LXW_TRUE</a>;</div>
<div class="line"><a class="code" href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95">worksheet_conditional_format_range</a>(worksheet, <a class="code" href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a>(<span class="stringliteral">&quot;A2:B2&quot;</span>), conditional_format);</div>
</div><!-- fragment --><p>Note, this property is only visible in Excel 2010 and later, however the default in Excel 2007 is to not have a border.</p>
<h2><a class="anchor" id="ww_cond_format_bar_direction"></a>
parameter: bar_direction</h2>
<p>The <code>bar_direction</code> property sets the direction for data bars. This property can be either one of the values from <a class="el" href="worksheet_8h.html#a3d18ac39694d2ee9256b17e74d1f9168" title="Conditional format data bar directions.">lxw_conditional_format_bar_direction</a> shown below. If the property isn't set then Excel will adjust the position automatically based on the context. The available options are:</p>
<ul>
<li><a class="el" href="worksheet_8h.html#a3d18ac39694d2ee9256b17e74d1f9168a7eadfdad6c89240406dad258dccc24f4">LXW_CONDITIONAL_BAR_DIRECTION_CONTEXT</a>: Data bar direction is set by Excel based on the context of the data displayed.</li>
<li><a class="el" href="worksheet_8h.html#a3d18ac39694d2ee9256b17e74d1f9168a1aa9036eda34cd072c021b8a391fcf1a">LXW_CONDITIONAL_BAR_DIRECTION_RIGHT_TO_LEFT</a>: Data bar direction is from right to left.</li>
<li><a class="el" href="worksheet_8h.html#a3d18ac39694d2ee9256b17e74d1f9168a6756d1b288252f1899e1322c2e7a8471">LXW_CONDITIONAL_BAR_DIRECTION_LEFT_TO_RIGHT</a>: Data bar direction is from left to right.</li>
</ul>
<p>Here is an example:</p>
<div class="fragment"><div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>          = <a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92dae0c88a53343690c1f43385b466dfe45e">LXW_CONDITIONAL_DATA_BAR</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a8b249e7f9e9f4849013e1879d9629eb1">bar_direction</a> = <a class="code" href="worksheet_8h.html#a3d18ac39694d2ee9256b17e74d1f9168a1aa9036eda34cd072c021b8a391fcf1a">LXW_CONDITIONAL_BAR_DIRECTION_RIGHT_TO_LEFT</a>;</div>
<div class="line"><a class="code" href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95">worksheet_conditional_format_range</a>(worksheet, <a class="code" href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a>(<span class="stringliteral">&quot;A2:B2&quot;</span>), conditional_format);</div>
</div><!-- fragment --><div class="image">
<img src="conditional_format6.png" alt=""/>
</div>
<p>Note, this property is only visible in Excel 2010 and later.</p>
<h2><a class="anchor" id="ww_cond_format_bar_axis_position"></a>
parameter: bar_axis_position</h2>
<p>The <code>bar_axis_position</code> property sets the position of the axis that is shown in data bars when there are negative values to display. The property can be either <code>midpoint</code> or <code>none</code>.</p>
<div class="fragment"><div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>              = <a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92dae0c88a53343690c1f43385b466dfe45e">LXW_CONDITIONAL_DATA_BAR</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a4082b4c5f5d63cc22b2aca1e0f482648">bar_axis_position</a> = <a class="code" href="worksheet_8h.html#a2398cf8e7d31f525508cd8c333877025a37c104277f4e3e558ceec07816b1576d">LXW_CONDITIONAL_BAR_AXIS_MIDPOINT</a>;</div>
<div class="line"><a class="code" href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95">worksheet_conditional_format_range</a>(worksheet, <a class="code" href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a>(<span class="stringliteral">&quot;A2:B12&quot;</span>), conditional_format);</div>
</div><!-- fragment --><p>If the property isn't set then Excel will position the axis based on the range of positive and negative values. The setting are defined in <a class="el" href="worksheet_8h.html#a2398cf8e7d31f525508cd8c333877025" title="Conditional format data bar axis options.">lxw_conditional_bar_axis_position</a>:</p>
<ul>
<li><a class="el" href="worksheet_8h.html#a2398cf8e7d31f525508cd8c333877025aa904b9b45e826c6c65bd16e1f351e421">LXW_CONDITIONAL_BAR_AXIS_AUTOMATIC</a>: Data bar axis position is set by Excel based on the context of the data displayed.</li>
<li><a class="el" href="worksheet_8h.html#a2398cf8e7d31f525508cd8c333877025a37c104277f4e3e558ceec07816b1576d">LXW_CONDITIONAL_BAR_AXIS_MIDPOINT</a>: Data bar axis position is set at the midpoint.</li>
<li><a class="el" href="worksheet_8h.html#a2398cf8e7d31f525508cd8c333877025ac11bb0e69ad383bc8d5be75c5320756d">LXW_CONDITIONAL_BAR_AXIS_NONE</a>: Data bar axis is turned off.</li>
</ul>
<p>Note, this property is only visible in Excel 2010 and later.</p>
<h2><a class="anchor" id="ww_cond_format_bar_axis_color"></a>
parameter: bar_axis_color</h2>
<p>The <code>bar_axis_color</code> property sets the color for the axis that is shown in data bars when there are negative values to display:</p>
<div class="fragment"><div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>           = <a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92dae0c88a53343690c1f43385b466dfe45e">LXW_CONDITIONAL_DATA_BAR</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#acabc9974b1c8ae033909b3e634016e57">bar_axis_color</a> = 0x0070C0;</div>
<div class="line"><a class="code" href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95">worksheet_conditional_format_range</a>(worksheet, <a class="code" href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a>(<span class="stringliteral">&quot;A3:C13&quot;</span>), conditional_format);</div>
</div><!-- fragment --><p>Note, this property is only visible in Excel 2010 and later.</p>
<h2><a class="anchor" id="ww_cond_format_data_bar_2010"></a>
parameter: data_bar_2010</h2>
<p>The <code>data_bar_2010</code> property sets Excel 2010 style data bars even when Excel 2010 specific properties aren't used. This can be used for ensure conformity across all the data bar formatting in a worksheet:</p>
<div class="fragment"><div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>          = <a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92dae0c88a53343690c1f43385b466dfe45e">LXW_CONDITIONAL_DATA_BAR</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a407c47249bff85bdc92f25502daea813">data_bar_2010</a> = <a class="code" href="common_8h.html#a57bffaf0ff3cb4e9f4f7f2b0b6dad349a7850bcc34c18efe2e45372f4069be0bf">LXW_TRUE</a>;</div>
<div class="line"><a class="code" href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95">worksheet_conditional_format_range</a>(worksheet, <a class="code" href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a>(<span class="stringliteral">&quot;A3:C13&quot;</span>), conditional_format);</div>
</div><!-- fragment --><h2><a class="anchor" id="ww_cond_format_stop_if_true"></a>
parameter: stop_if_true</h2>
<p>The <code>stop_if_true</code> parameter can be used to set the "stop if true" feature of a conditional formatting rule when more than one rule is applied to a cell or a range of cells. When this parameter is set then subsequent rules are not evaluated if the current rule is true:</p>
<div class="fragment"><div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>         = <a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92dac9180feb375f5d9302d80467398a0c6e">LXW_CONDITIONAL_TYPE_CELL</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a06fc7b5549574bac769cf93ae7180e3f">criteria</a>     = <a class="code" href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6ba10ffa392949de59161307149c55a971b">LXW_CONDITIONAL_CRITERIA_GREATER_THAN</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#aa11acc4f64d532fafc7cda9a98dc1fc9">value</a>        = 5;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a18603b91945774c02a3aeae8e133bbc6">stop_if_true</a> = <a class="code" href="common_8h.html#a57bffaf0ff3cb4e9f4f7f2b0b6dad349a7850bcc34c18efe2e45372f4069be0bf">LXW_TRUE</a>;</div>
<div class="line"><a class="code" href="worksheet_8h.html#a171180f46f54aa816c2b3c6c8688ab17">worksheet_conditional_format_cell</a>(worksheet, <a class="code" href="utility_8h.html#ad510ac6df573d23203374e24dba373d2">CELL</a>(<span class="stringliteral">&quot;A1&quot;</span>), conditional_format);</div>
</div><!-- fragment --><h2><a class="anchor" id="ww_cond_format_multi_range"></a>
parameter: multi_range</h2>
<p>The <code>multi_range</code> option is used to extend a conditional format over non-contiguous ranges.</p>
<p>It is possible to apply the conditional format to different cell ranges in a worksheet using multiple calls to <code>worksheet_conditional_format()</code>. However, as a minor optimization it is also possible in Excel to apply the same conditional format to different non-contiguous cell ranges.</p>
<p>This is replicated in <code>worksheet_conditional_format()</code> using the <code>multi_range</code> option. The range must contain the primary range for the conditional format and any others separated by spaces.</p>
<p>For example to apply one conditional format to two ranges, <code>B3:K6</code> and <code>B9:K12</code>:</p>
<div class="fragment"><div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">type</a>        = <a class="code" href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92dac9180feb375f5d9302d80467398a0c6e">LXW_CONDITIONAL_TYPE_CELL</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a06fc7b5549574bac769cf93ae7180e3f">criteria</a>    = <a class="code" href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6bad288ab1847d59fa1183555c5a82c4d11">LXW_CONDITIONAL_CRITERIA_GREATER_THAN_OR_EQUAL_TO</a>;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#aa11acc4f64d532fafc7cda9a98dc1fc9">value</a>       = 50;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a3d3ca3432272ee4d5172349ae030dfcc">format</a>      = format1;</div>
<div class="line">conditional_format-&gt;<a class="code" href="structlxw__conditional__format.html#a3fed811ec39cfda41a3c4db3135f1841">multi_range</a> = <span class="stringliteral">&quot;B3:K6 B9:K12&quot;</span>;</div>
<div class="line"><a class="code" href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95">worksheet_conditional_format_range</a>(worksheet6, <a class="code" href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a>(<span class="stringliteral">&quot;B3:K12&quot;</span>), conditional_format);</div>
</div><!-- fragment --><p>Next: <a class="el" href="working_with_comments.html">Working with Cell Comments</a> </p>
</div></div><!-- contents -->
</div><!-- PageDoc -->
<div class="ttc" id="astructlxw__conditional__format_html_acabc9974b1c8ae033909b3e634016e57"><div class="ttname"><a href="structlxw__conditional__format.html#acabc9974b1c8ae033909b3e634016e57">lxw_conditional_format::bar_axis_color</a></div><div class="ttdeci">lxw_color_t bar_axis_color</div><div class="ttdef"><b>Definition:</b> worksheet.h:1155</div></div>
<div class="ttc" id="astructlxw__conditional__format_html_ad053eb830063113c9893c04a0a7b4ef4"><div class="ttname"><a href="structlxw__conditional__format.html#ad053eb830063113c9893c04a0a7b4ef4">lxw_conditional_format::bar_negative_border_color_same</a></div><div class="ttdeci">uint8_t bar_negative_border_color_same</div><div class="ttdef"><b>Definition:</b> worksheet.h:1131</div></div>
<div class="ttc" id="astructlxw__conditional__format_html_af8b4013a50ba2a58fa009dc22dcb9db8"><div class="ttname"><a href="structlxw__conditional__format.html#af8b4013a50ba2a58fa009dc22dcb9db8">lxw_conditional_format::min_value</a></div><div class="ttdeci">double min_value</div><div class="ttdef"><b>Definition:</b> worksheet.h:1038</div></div>
<div class="ttc" id="aworksheet_8h_html_a47b554f3a8f1475b57df705fd326ae6bacef71d1c45abb3597b83f3f66243fabd"><div class="ttname"><a href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6bacef71d1c45abb3597b83f3f66243fabd">LXW_CONDITIONAL_CRITERIA_TEXT_BEGINS_WITH</a></div><div class="ttdeci">@ LXW_CONDITIONAL_CRITERIA_TEXT_BEGINS_WITH</div><div class="ttdef"><b>Definition:</b> worksheet.h:332</div></div>
<div class="ttc" id="astructlxw__conditional__format_html"><div class="ttname"><a href="structlxw__conditional__format.html">lxw_conditional_format</a></div><div class="ttdoc">Worksheet conditional formatting options.</div><div class="ttdef"><b>Definition:</b> worksheet.h:998</div></div>
<div class="ttc" id="astructlxw__conditional__format_html_a3d3ca3432272ee4d5172349ae030dfcc"><div class="ttname"><a href="structlxw__conditional__format.html#a3d3ca3432272ee4d5172349ae030dfcc">lxw_conditional_format::format</a></div><div class="ttdeci">lxw_format * format</div><div class="ttdef"><b>Definition:</b> worksheet.h:1034</div></div>
<div class="ttc" id="aformat_8h_html_a19cbd7c34692eb7fb35a7411432d836e"><div class="ttname"><a href="format_8h.html#a19cbd7c34692eb7fb35a7411432d836e">format_set_italic</a></div><div class="ttdeci">void format_set_italic(lxw_format *format)</div><div class="ttdoc">Turn on italic for the format font.</div></div>
<div class="ttc" id="aworksheet_8h_html_a47b554f3a8f1475b57df705fd326ae6ba87a87b39d39957377f89cd0cb40fc0ee"><div class="ttname"><a href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6ba87a87b39d39957377f89cd0cb40fc0ee">LXW_CONDITIONAL_CRITERIA_TEXT_ENDS_WITH</a></div><div class="ttdeci">@ LXW_CONDITIONAL_CRITERIA_TEXT_ENDS_WITH</div><div class="ttdef"><b>Definition:</b> worksheet.h:335</div></div>
<div class="ttc" id="aworksheet_8h_html_a47b554f3a8f1475b57df705fd326ae6bacad0cfdfc5fdcb4a41c60d848a88e3a9"><div class="ttname"><a href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6bacad0cfdfc5fdcb4a41c60d848a88e3a9">LXW_CONDITIONAL_CRITERIA_TIME_PERIOD_LAST_7_DAYS</a></div><div class="ttdeci">@ LXW_CONDITIONAL_CRITERIA_TIME_PERIOD_LAST_7_DAYS</div><div class="ttdef"><b>Definition:</b> worksheet.h:347</div></div>
<div class="ttc" id="aworksheet_8h_html_a2398cf8e7d31f525508cd8c333877025a37c104277f4e3e558ceec07816b1576d"><div class="ttname"><a href="worksheet_8h.html#a2398cf8e7d31f525508cd8c333877025a37c104277f4e3e558ceec07816b1576d">LXW_CONDITIONAL_BAR_AXIS_MIDPOINT</a></div><div class="ttdeci">@ LXW_CONDITIONAL_BAR_AXIS_MIDPOINT</div><div class="ttdef"><b>Definition:</b> worksheet.h:464</div></div>
<div class="ttc" id="astructlxw__conditional__format_html_ad09997b3e8aa12dba5617739c8839e7d"><div class="ttname"><a href="structlxw__conditional__format.html#ad09997b3e8aa12dba5617739c8839e7d">lxw_conditional_format::value_string</a></div><div class="ttdeci">char * value_string</div><div class="ttdef"><b>Definition:</b> worksheet.h:1021</div></div>
<div class="ttc" id="astructlxw__conditional__format_html_aedf2517dee1d1aac4e963dc315879b62"><div class="ttname"><a href="structlxw__conditional__format.html#aedf2517dee1d1aac4e963dc315879b62">lxw_conditional_format::min_rule_type</a></div><div class="ttdeci">uint8_t min_rule_type</div><div class="ttdef"><b>Definition:</b> worksheet.h:1047</div></div>
<div class="ttc" id="aworksheet_8h_html_affdc3f401f3ee241fad5d651628ac92da288a6952f520145b6c00e5ad6d273370"><div class="ttname"><a href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92da288a6952f520145b6c00e5ad6d273370">LXW_CONDITIONAL_TYPE_DUPLICATE</a></div><div class="ttdeci">@ LXW_CONDITIONAL_TYPE_DUPLICATE</div><div class="ttdef"><b>Definition:</b> worksheet.h:246</div></div>
<div class="ttc" id="aworksheet_8h_html_a47b554f3a8f1475b57df705fd326ae6bad288ab1847d59fa1183555c5a82c4d11"><div class="ttname"><a href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6bad288ab1847d59fa1183555c5a82c4d11">LXW_CONDITIONAL_CRITERIA_GREATER_THAN_OR_EQUAL_TO</a></div><div class="ttdeci">@ LXW_CONDITIONAL_CRITERIA_GREATER_THAN_OR_EQUAL_TO</div><div class="ttdef"><b>Definition:</b> worksheet.h:314</div></div>
<div class="ttc" id="aworksheet_8h_html_a3d18ac39694d2ee9256b17e74d1f9168a1aa9036eda34cd072c021b8a391fcf1a"><div class="ttname"><a href="worksheet_8h.html#a3d18ac39694d2ee9256b17e74d1f9168a1aa9036eda34cd072c021b8a391fcf1a">LXW_CONDITIONAL_BAR_DIRECTION_RIGHT_TO_LEFT</a></div><div class="ttdeci">@ LXW_CONDITIONAL_BAR_DIRECTION_RIGHT_TO_LEFT</div><div class="ttdef"><b>Definition:</b> worksheet.h:446</div></div>
<div class="ttc" id="aformat_8h_html_a85e1b0baf44b445b65894e48722aec14"><div class="ttname"><a href="format_8h.html#a85e1b0baf44b445b65894e48722aec14">format_set_bold</a></div><div class="ttdeci">void format_set_bold(lxw_format *format)</div><div class="ttdoc">Turn on bold for the format font.</div></div>
<div class="ttc" id="aworksheet_8h_html_affdc3f401f3ee241fad5d651628ac92dabdae15fb9048bcd6823c8ff02b553548"><div class="ttname"><a href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92dabdae15fb9048bcd6823c8ff02b553548">LXW_CONDITIONAL_TYPE_AVERAGE</a></div><div class="ttdeci">@ LXW_CONDITIONAL_TYPE_AVERAGE</div><div class="ttdef"><b>Definition:</b> worksheet.h:243</div></div>
<div class="ttc" id="astructlxw__conditional__format_html_a8b249e7f9e9f4849013e1879d9629eb1"><div class="ttname"><a href="structlxw__conditional__format.html#a8b249e7f9e9f4849013e1879d9629eb1">lxw_conditional_format::bar_direction</a></div><div class="ttdeci">uint8_t bar_direction</div><div class="ttdef"><b>Definition:</b> worksheet.h:1142</div></div>
<div class="ttc" id="astructlxw__conditional__format_html_af81689ba9f4c8a89b1e32f62054136ad"><div class="ttname"><a href="structlxw__conditional__format.html#af81689ba9f4c8a89b1e32f62054136ad">lxw_conditional_format::mid_color</a></div><div class="ttdeci">lxw_color_t mid_color</div><div class="ttdef"><b>Definition:</b> worksheet.h:1068</div></div>
<div class="ttc" id="astructlxw__conditional__format_html_afbf602ea1d3d6df8591976c9c62a7cf9"><div class="ttname"><a href="structlxw__conditional__format.html#afbf602ea1d3d6df8591976c9c62a7cf9">lxw_conditional_format::bar_border_color</a></div><div class="ttdeci">lxw_color_t bar_border_color</div><div class="ttdef"><b>Definition:</b> worksheet.h:1114</div></div>
<div class="ttc" id="aworksheet_8h_html_aa1c8a0821648b21a1483d743587bb8eba568c6fe29a89937e792464b59d7f0f93"><div class="ttname"><a href="worksheet_8h.html#aa1c8a0821648b21a1483d743587bb8eba568c6fe29a89937e792464b59d7f0f93">LXW_CONDITIONAL_RULE_TYPE_NUMBER</a></div><div class="ttdeci">@ LXW_CONDITIONAL_RULE_TYPE_NUMBER</div><div class="ttdef"><b>Definition:</b> worksheet.h:413</div></div>
<div class="ttc" id="astructlxw__conditional__format_html_a407c47249bff85bdc92f25502daea813"><div class="ttname"><a href="structlxw__conditional__format.html#a407c47249bff85bdc92f25502daea813">lxw_conditional_format::data_bar_2010</a></div><div class="ttdeci">uint8_t data_bar_2010</div><div class="ttdef"><b>Definition:</b> worksheet.h:1102</div></div>
<div class="ttc" id="aworksheet_8h_html_affdc3f401f3ee241fad5d651628ac92da0d7cc55cbacac31182eef8bb16b69ab6"><div class="ttname"><a href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92da0d7cc55cbacac31182eef8bb16b69ab6">LXW_CONDITIONAL_TYPE_TOP</a></div><div class="ttdeci">@ LXW_CONDITIONAL_TYPE_TOP</div><div class="ttdef"><b>Definition:</b> worksheet.h:253</div></div>
<div class="ttc" id="astructlxw__conditional__format_html_ad184e6a2d11120c042c22e181b15a348"><div class="ttname"><a href="structlxw__conditional__format.html#ad184e6a2d11120c042c22e181b15a348">lxw_conditional_format::type</a></div><div class="ttdeci">uint8_t type</div><div class="ttdef"><b>Definition:</b> worksheet.h:1003</div></div>
<div class="ttc" id="aworksheet_8h_html_affdc3f401f3ee241fad5d651628ac92da2101fa174d43f88be22789112afb3716"><div class="ttname"><a href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92da2101fa174d43f88be22789112afb3716">LXW_CONDITIONAL_TYPE_TIME_PERIOD</a></div><div class="ttdeci">@ LXW_CONDITIONAL_TYPE_TIME_PERIOD</div><div class="ttdef"><b>Definition:</b> worksheet.h:239</div></div>
<div class="ttc" id="aworksheet_8h_html_affdc3f401f3ee241fad5d651628ac92dacd711f072b3130ccd6ef1c233eba0298"><div class="ttname"><a href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92dacd711f072b3130ccd6ef1c233eba0298">LXW_CONDITIONAL_TYPE_TEXT</a></div><div class="ttdeci">@ LXW_CONDITIONAL_TYPE_TEXT</div><div class="ttdef"><b>Definition:</b> worksheet.h:235</div></div>
<div class="ttc" id="aworksheet_8h_html_aa1c8a0821648b21a1483d743587bb8eba4c42f493acf1bc058cfb3fe7fe439d48"><div class="ttname"><a href="worksheet_8h.html#aa1c8a0821648b21a1483d743587bb8eba4c42f493acf1bc058cfb3fe7fe439d48">LXW_CONDITIONAL_RULE_TYPE_PERCENTILE</a></div><div class="ttdeci">@ LXW_CONDITIONAL_RULE_TYPE_PERCENTILE</div><div class="ttdef"><b>Definition:</b> worksheet.h:419</div></div>
<div class="ttc" id="aworksheet_8h_html_affdc3f401f3ee241fad5d651628ac92da058193bb32dae5557ced4117f57a8182"><div class="ttname"><a href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92da058193bb32dae5557ced4117f57a8182">LXW_CONDITIONAL_TYPE_UNIQUE</a></div><div class="ttdeci">@ LXW_CONDITIONAL_TYPE_UNIQUE</div><div class="ttdef"><b>Definition:</b> worksheet.h:249</div></div>
<div class="ttc" id="astructlxw__format_html"><div class="ttname"><a href="structlxw__format.html">lxw_format</a></div><div class="ttdoc">Struct to represent the formatting properties of an Excel format.</div><div class="ttdef"><b>Definition:</b> format.h:358</div></div>
<div class="ttc" id="aworksheet_8h_html_affdc3f401f3ee241fad5d651628ac92dad29f06d444d5d900d076551cf057eee5"><div class="ttname"><a href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92dad29f06d444d5d900d076551cf057eee5">LXW_CONDITIONAL_TYPE_ICON_SETS</a></div><div class="ttdeci">@ LXW_CONDITIONAL_TYPE_ICON_SETS</div><div class="ttdef"><b>Definition:</b> worksheet.h:289</div></div>
<div class="ttc" id="autility_8h_html_a4dbbdfc9b616195c799dee78e727cecc"><div class="ttname"><a href="utility_8h.html#a4dbbdfc9b616195c799dee78e727cecc">RANGE</a></div><div class="ttdeci">#define RANGE(range)</div><div class="ttdoc">Convert an Excel A1:B2 range into a (first_row, first_col, last_row, last_col) sequence.</div><div class="ttdef"><b>Definition:</b> utility.h:82</div></div>
<div class="ttc" id="acommon_8h_html_a57bffaf0ff3cb4e9f4f7f2b0b6dad349a7850bcc34c18efe2e45372f4069be0bf"><div class="ttname"><a href="common_8h.html#a57bffaf0ff3cb4e9f4f7f2b0b6dad349a7850bcc34c18efe2e45372f4069be0bf">LXW_TRUE</a></div><div class="ttdeci">@ LXW_TRUE</div><div class="ttdef"><b>Definition:</b> common.h:53</div></div>
<div class="ttc" id="astructlxw__conditional__format_html_a208a4c91723db5794041d1b488992619"><div class="ttname"><a href="structlxw__conditional__format.html#a208a4c91723db5794041d1b488992619">lxw_conditional_format::bar_only</a></div><div class="ttdeci">uint8_t bar_only</div><div class="ttdef"><b>Definition:</b> worksheet.h:1094</div></div>
<div class="ttc" id="astructlxw__conditional__format_html_ae05120a2be801d037bed0abe8a71de40"><div class="ttname"><a href="structlxw__conditional__format.html#ae05120a2be801d037bed0abe8a71de40">lxw_conditional_format::mid_value</a></div><div class="ttdeci">double mid_value</div><div class="ttdef"><b>Definition:</b> worksheet.h:1055</div></div>
<div class="ttc" id="aworksheet_8h_html_a171180f46f54aa816c2b3c6c8688ab17"><div class="ttname"><a href="worksheet_8h.html#a171180f46f54aa816c2b3c6c8688ab17">worksheet_conditional_format_cell</a></div><div class="ttdeci">lxw_error worksheet_conditional_format_cell(lxw_worksheet *worksheet, lxw_row_t row, lxw_col_t col, lxw_conditional_format *conditional_format)</div><div class="ttdoc">Add a conditional format to a worksheet cell.</div></div>
<div class="ttc" id="aworksheet_8h_html_affdc3f401f3ee241fad5d651628ac92da970b8654514d6525221bc71da66c5550"><div class="ttname"><a href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92da970b8654514d6525221bc71da66c5550">LXW_CONDITIONAL_TYPE_FORMULA</a></div><div class="ttdeci">@ LXW_CONDITIONAL_TYPE_FORMULA</div><div class="ttdef"><b>Definition:</b> worksheet.h:273</div></div>
<div class="ttc" id="astructlxw__conditional__format_html_a18603b91945774c02a3aeae8e133bbc6"><div class="ttname"><a href="structlxw__conditional__format.html#a18603b91945774c02a3aeae8e133bbc6">lxw_conditional_format::stop_if_true</a></div><div class="ttdeci">uint8_t stop_if_true</div><div class="ttdef"><b>Definition:</b> worksheet.h:1190</div></div>
<div class="ttc" id="aformat_8h_html_aeef47436c335daf1801683ac7b3b587d"><div class="ttname"><a href="format_8h.html#aeef47436c335daf1801683ac7b3b587d">format_set_bg_color</a></div><div class="ttdeci">void format_set_bg_color(lxw_format *format, lxw_color_t color)</div><div class="ttdoc">Set the pattern background color for a cell.</div></div>
<div class="ttc" id="astructlxw__conditional__format_html_aa78aa5551b20f92d1d80efc00939005c"><div class="ttname"><a href="structlxw__conditional__format.html#aa78aa5551b20f92d1d80efc00939005c">lxw_conditional_format::bar_negative_color_same</a></div><div class="ttdeci">uint8_t bar_negative_color_same</div><div class="ttdef"><b>Definition:</b> worksheet.h:1125</div></div>
<div class="ttc" id="aworksheet_8h_html_aaeb0374167b23080c63eccac2a64840ba24f085582f0fe3e87f99686d090c45ca"><div class="ttname"><a href="worksheet_8h.html#aaeb0374167b23080c63eccac2a64840ba24f085582f0fe3e87f99686d090c45ca">LXW_CONDITIONAL_ICONS_3_TRAFFIC_LIGHTS_UNRIMMED</a></div><div class="ttdeci">@ LXW_CONDITIONAL_ICONS_3_TRAFFIC_LIGHTS_UNRIMMED</div><div class="ttdef"><b>Definition:</b> worksheet.h:486</div></div>
<div class="ttc" id="aworksheet_8h_html_a47b554f3a8f1475b57df705fd326ae6ba085943843b38880c58d2af4cd5e85c94"><div class="ttname"><a href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6ba085943843b38880c58d2af4cd5e85c94">LXW_CONDITIONAL_CRITERIA_BETWEEN</a></div><div class="ttdeci">@ LXW_CONDITIONAL_CRITERIA_BETWEEN</div><div class="ttdef"><b>Definition:</b> worksheet.h:320</div></div>
<div class="ttc" id="aworksheet_8h_html_affdc3f401f3ee241fad5d651628ac92da84fcba60bd3f6efa052ba4154a155031"><div class="ttname"><a href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92da84fcba60bd3f6efa052ba4154a155031">LXW_CONDITIONAL_TYPE_NO_BLANKS</a></div><div class="ttdeci">@ LXW_CONDITIONAL_TYPE_NO_BLANKS</div><div class="ttdef"><b>Definition:</b> worksheet.h:263</div></div>
<div class="ttc" id="aworksheet_8h_html_affdc3f401f3ee241fad5d651628ac92da0187499e69ed35a00706a2749c967534"><div class="ttname"><a href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92da0187499e69ed35a00706a2749c967534">LXW_CONDITIONAL_TYPE_BLANKS</a></div><div class="ttdeci">@ LXW_CONDITIONAL_TYPE_BLANKS</div><div class="ttdef"><b>Definition:</b> worksheet.h:260</div></div>
<div class="ttc" id="aworksheet_8h_html_a47b554f3a8f1475b57df705fd326ae6baea70f63a3805fd590298e46bcd68f444"><div class="ttname"><a href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6baea70f63a3805fd590298e46bcd68f444">LXW_CONDITIONAL_CRITERIA_TOP_OR_BOTTOM_PERCENT</a></div><div class="ttdeci">@ LXW_CONDITIONAL_CRITERIA_TOP_OR_BOTTOM_PERCENT</div><div class="ttdef"><b>Definition:</b> worksheet.h:398</div></div>
<div class="ttc" id="aworksheet_8h_html_a47b554f3a8f1475b57df705fd326ae6baba0dae0546768db046eb00a21269206f"><div class="ttname"><a href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6baba0dae0546768db046eb00a21269206f">LXW_CONDITIONAL_CRITERIA_AVERAGE_1_STD_DEV_ABOVE</a></div><div class="ttdeci">@ LXW_CONDITIONAL_CRITERIA_AVERAGE_1_STD_DEV_ABOVE</div><div class="ttdef"><b>Definition:</b> worksheet.h:380</div></div>
<div class="ttc" id="astructlxw__conditional__format_html_a1ee05313ff7e57c5ac48aca6b0ed3034"><div class="ttname"><a href="structlxw__conditional__format.html#a1ee05313ff7e57c5ac48aca6b0ed3034">lxw_conditional_format::bar_negative_border_color</a></div><div class="ttdeci">lxw_color_t bar_negative_border_color</div><div class="ttdef"><b>Definition:</b> worksheet.h:1119</div></div>
<div class="ttc" id="astructlxw__conditional__format_html_ae7dce71531b0b265f88577b008368d96"><div class="ttname"><a href="structlxw__conditional__format.html#ae7dce71531b0b265f88577b008368d96">lxw_conditional_format::icons_only</a></div><div class="ttdeci">uint8_t icons_only</div><div class="ttdef"><b>Definition:</b> worksheet.h:1167</div></div>
<div class="ttc" id="astructlxw__conditional__format_html_ab800fddf49071afb1ce9f020d44b2b3c"><div class="ttname"><a href="structlxw__conditional__format.html#ab800fddf49071afb1ce9f020d44b2b3c">lxw_conditional_format::min_color</a></div><div class="ttdeci">lxw_color_t min_color</div><div class="ttdef"><b>Definition:</b> worksheet.h:1051</div></div>
<div class="ttc" id="aworksheet_8h_html_affdc3f401f3ee241fad5d651628ac92dac9180feb375f5d9302d80467398a0c6e"><div class="ttname"><a href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92dac9180feb375f5d9302d80467398a0c6e">LXW_CONDITIONAL_TYPE_CELL</a></div><div class="ttdeci">@ LXW_CONDITIONAL_TYPE_CELL</div><div class="ttdef"><b>Definition:</b> worksheet.h:231</div></div>
<div class="ttc" id="astructlxw__conditional__format_html_a7f3f95a74f02ab316c38db46b0b8499c"><div class="ttname"><a href="structlxw__conditional__format.html#a7f3f95a74f02ab316c38db46b0b8499c">lxw_conditional_format::bar_solid</a></div><div class="ttdeci">uint8_t bar_solid</div><div class="ttdef"><b>Definition:</b> worksheet.h:1106</div></div>
<div class="ttc" id="aworksheet_8h_html_affdc3f401f3ee241fad5d651628ac92dae0c88a53343690c1f43385b466dfe45e"><div class="ttname"><a href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92dae0c88a53343690c1f43385b466dfe45e">LXW_CONDITIONAL_DATA_BAR</a></div><div class="ttdeci">@ LXW_CONDITIONAL_DATA_BAR</div><div class="ttdef"><b>Definition:</b> worksheet.h:285</div></div>
<div class="ttc" id="astructlxw__conditional__format_html_a1f9a9a9a1840d78f6ac697365bb957bf"><div class="ttname"><a href="structlxw__conditional__format.html#a1f9a9a9a1840d78f6ac697365bb957bf">lxw_conditional_format::bar_negative_color</a></div><div class="ttdeci">lxw_color_t bar_negative_color</div><div class="ttdef"><b>Definition:</b> worksheet.h:1110</div></div>
<div class="ttc" id="astructlxw__conditional__format_html_a0b3dd44b45e5cc5c49be1817aa873b04"><div class="ttname"><a href="structlxw__conditional__format.html#a0b3dd44b45e5cc5c49be1817aa873b04">lxw_conditional_format::mid_rule_type</a></div><div class="ttdeci">uint8_t mid_rule_type</div><div class="ttdef"><b>Definition:</b> worksheet.h:1064</div></div>
<div class="ttc" id="astructlxw__conditional__format_html_addb516a5e4872c4dfaafe1718dc9a8a9"><div class="ttname"><a href="structlxw__conditional__format.html#addb516a5e4872c4dfaafe1718dc9a8a9">lxw_conditional_format::bar_no_border</a></div><div class="ttdeci">uint8_t bar_no_border</div><div class="ttdef"><b>Definition:</b> worksheet.h:1135</div></div>
<div class="ttc" id="aworksheet_8h_html_a47b554f3a8f1475b57df705fd326ae6ba71c995839e4851d23289ff4505dc82c4"><div class="ttname"><a href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6ba71c995839e4851d23289ff4505dc82c4">LXW_CONDITIONAL_CRITERIA_TIME_PERIOD_YESTERDAY</a></div><div class="ttdeci">@ LXW_CONDITIONAL_CRITERIA_TIME_PERIOD_YESTERDAY</div><div class="ttdef"><b>Definition:</b> worksheet.h:338</div></div>
<div class="ttc" id="aworksheet_8h_html_a47b554f3a8f1475b57df705fd326ae6baff96b7580e80b2167357a587110f0e5c"><div class="ttname"><a href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6baff96b7580e80b2167357a587110f0e5c">LXW_CONDITIONAL_CRITERIA_TEXT_CONTAINING</a></div><div class="ttdeci">@ LXW_CONDITIONAL_CRITERIA_TEXT_CONTAINING</div><div class="ttdef"><b>Definition:</b> worksheet.h:326</div></div>
<div class="ttc" id="astructlxw__conditional__format_html_a3fed811ec39cfda41a3c4db3135f1841"><div class="ttname"><a href="structlxw__conditional__format.html#a3fed811ec39cfda41a3c4db3135f1841">lxw_conditional_format::multi_range</a></div><div class="ttdeci">char * multi_range</div><div class="ttdef"><b>Definition:</b> worksheet.h:1183</div></div>
<div class="ttc" id="astructlxw__conditional__format_html_a4082b4c5f5d63cc22b2aca1e0f482648"><div class="ttname"><a href="structlxw__conditional__format.html#a4082b4c5f5d63cc22b2aca1e0f482648">lxw_conditional_format::bar_axis_position</a></div><div class="ttdeci">uint8_t bar_axis_position</div><div class="ttdef"><b>Definition:</b> worksheet.h:1150</div></div>
<div class="ttc" id="aworksheet_8h_html_a47b554f3a8f1475b57df705fd326ae6ba20233dc769eae6248dde4f5c702d5842"><div class="ttname"><a href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6ba20233dc769eae6248dde4f5c702d5842">LXW_CONDITIONAL_CRITERIA_TEXT_NOT_CONTAINING</a></div><div class="ttdeci">@ LXW_CONDITIONAL_CRITERIA_TEXT_NOT_CONTAINING</div><div class="ttdef"><b>Definition:</b> worksheet.h:329</div></div>
<div class="ttc" id="aworksheet_8h_html_affdc3f401f3ee241fad5d651628ac92dadd06584e94945519df4fc2252882e374"><div class="ttname"><a href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92dadd06584e94945519df4fc2252882e374">LXW_CONDITIONAL_TYPE_ERRORS</a></div><div class="ttdeci">@ LXW_CONDITIONAL_TYPE_ERRORS</div><div class="ttdef"><b>Definition:</b> worksheet.h:266</div></div>
<div class="ttc" id="astructlxw__conditional__format_html_ad2dc53f2c1668c926452a27b41fcb640"><div class="ttname"><a href="structlxw__conditional__format.html#ad2dc53f2c1668c926452a27b41fcb640">lxw_conditional_format::bar_color</a></div><div class="ttdeci">lxw_color_t bar_color</div><div class="ttdef"><b>Definition:</b> worksheet.h:1090</div></div>
<div class="ttc" id="astructlxw__conditional__format_html_a06fc7b5549574bac769cf93ae7180e3f"><div class="ttname"><a href="structlxw__conditional__format.html#a06fc7b5549574bac769cf93ae7180e3f">lxw_conditional_format::criteria</a></div><div class="ttdeci">uint8_t criteria</div><div class="ttdef"><b>Definition:</b> worksheet.h:1011</div></div>
<div class="ttc" id="aworksheet_8h_html_a47b554f3a8f1475b57df705fd326ae6ba70fa69c881508f2643929964ba0c2816"><div class="ttname"><a href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6ba70fa69c881508f2643929964ba0c2816">LXW_CONDITIONAL_CRITERIA_EQUAL_TO</a></div><div class="ttdeci">@ LXW_CONDITIONAL_CRITERIA_EQUAL_TO</div><div class="ttdef"><b>Definition:</b> worksheet.h:302</div></div>
<div class="ttc" id="aworksheet_8h_html_aaeb0374167b23080c63eccac2a64840ba2a85edc11a29e1ed4ef360b758c4fa58"><div class="ttname"><a href="worksheet_8h.html#aaeb0374167b23080c63eccac2a64840ba2a85edc11a29e1ed4ef360b758c4fa58">LXW_CONDITIONAL_ICONS_3_ARROWS_COLORED</a></div><div class="ttdeci">@ LXW_CONDITIONAL_ICONS_3_ARROWS_COLORED</div><div class="ttdef"><b>Definition:</b> worksheet.h:477</div></div>
<div class="ttc" id="aworksheet_8h_html_a47b554f3a8f1475b57df705fd326ae6ba10ffa392949de59161307149c55a971b"><div class="ttname"><a href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6ba10ffa392949de59161307149c55a971b">LXW_CONDITIONAL_CRITERIA_GREATER_THAN</a></div><div class="ttdeci">@ LXW_CONDITIONAL_CRITERIA_GREATER_THAN</div><div class="ttdef"><b>Definition:</b> worksheet.h:308</div></div>
<div class="ttc" id="astructlxw__conditional__format_html_aac7b01a937ca3203030ddbe8d34d54de"><div class="ttname"><a href="structlxw__conditional__format.html#aac7b01a937ca3203030ddbe8d34d54de">lxw_conditional_format::reverse_icons</a></div><div class="ttdeci">uint8_t reverse_icons</div><div class="ttdef"><b>Definition:</b> worksheet.h:1163</div></div>
<div class="ttc" id="aformat_8h_html_abeafc6e8222ba9fcfd4f2c2f4e9ea38baedd7412491d9f34fc5f947ada9d196ec"><div class="ttname"><a href="format_8h.html#abeafc6e8222ba9fcfd4f2c2f4e9ea38baedd7412491d9f34fc5f947ada9d196ec">LXW_COLOR_RED</a></div><div class="ttdeci">@ LXW_COLOR_RED</div><div class="ttdef"><b>Definition:</b> format.h:217</div></div>
<div class="ttc" id="astructlxw__conditional__format_html_a0cf9351bf7eb8bdfddb988ca9c24f308"><div class="ttname"><a href="structlxw__conditional__format.html#a0cf9351bf7eb8bdfddb988ca9c24f308">lxw_conditional_format::icon_style</a></div><div class="ttdeci">uint8_t icon_style</div><div class="ttdef"><b>Definition:</b> worksheet.h:1159</div></div>
<div class="ttc" id="astructlxw__conditional__format_html_aa11acc4f64d532fafc7cda9a98dc1fc9"><div class="ttname"><a href="structlxw__conditional__format.html#aa11acc4f64d532fafc7cda9a98dc1fc9">lxw_conditional_format::value</a></div><div class="ttdeci">double value</div><div class="ttdef"><b>Definition:</b> worksheet.h:1015</div></div>
<div class="ttc" id="aworksheet_8h_html_aa1c8a0821648b21a1483d743587bb8eba797bc688aec003e9ca84c49b52880f68"><div class="ttname"><a href="worksheet_8h.html#aa1c8a0821648b21a1483d743587bb8eba797bc688aec003e9ca84c49b52880f68">LXW_CONDITIONAL_RULE_TYPE_PERCENT</a></div><div class="ttdeci">@ LXW_CONDITIONAL_RULE_TYPE_PERCENT</div><div class="ttdef"><b>Definition:</b> worksheet.h:416</div></div>
<div class="ttc" id="aformat_8h_html_a61981b2080bfe6381ede5358ee05b05c"><div class="ttname"><a href="format_8h.html#a61981b2080bfe6381ede5358ee05b05c">format_set_font_color</a></div><div class="ttdeci">void format_set_font_color(lxw_format *format, lxw_color_t color)</div><div class="ttdoc">Set the color of the font used in the cell.</div></div>
<div class="ttc" id="aworksheet_8h_html_affdc3f401f3ee241fad5d651628ac92da70562e7676d45e65a932623728250058"><div class="ttname"><a href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92da70562e7676d45e65a932623728250058">LXW_CONDITIONAL_TYPE_NO_ERRORS</a></div><div class="ttdeci">@ LXW_CONDITIONAL_TYPE_NO_ERRORS</div><div class="ttdef"><b>Definition:</b> worksheet.h:269</div></div>
<div class="ttc" id="aworksheet_8h_html_a47b554f3a8f1475b57df705fd326ae6ba7abe5eb7e05b62e5722ee13ea2820be8"><div class="ttname"><a href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6ba7abe5eb7e05b62e5722ee13ea2820be8">LXW_CONDITIONAL_CRITERIA_AVERAGE_ABOVE</a></div><div class="ttdeci">@ LXW_CONDITIONAL_CRITERIA_AVERAGE_ABOVE</div><div class="ttdef"><b>Definition:</b> worksheet.h:368</div></div>
<div class="ttc" id="astructlxw__conditional__format_html_af473b5134c8851ad6e8e32b8e96e125a"><div class="ttname"><a href="structlxw__conditional__format.html#af473b5134c8851ad6e8e32b8e96e125a">lxw_conditional_format::max_rule_type</a></div><div class="ttdeci">uint8_t max_rule_type</div><div class="ttdef"><b>Definition:</b> worksheet.h:1082</div></div>
<div class="ttc" id="aworksheet_8h_html_a47b554f3a8f1475b57df705fd326ae6bae8a15acdb209feb53b8948c0e50cc9c3"><div class="ttname"><a href="worksheet_8h.html#a47b554f3a8f1475b57df705fd326ae6bae8a15acdb209feb53b8948c0e50cc9c3">LXW_CONDITIONAL_CRITERIA_LESS_THAN</a></div><div class="ttdeci">@ LXW_CONDITIONAL_CRITERIA_LESS_THAN</div><div class="ttdef"><b>Definition:</b> worksheet.h:311</div></div>
<div class="ttc" id="astructlxw__conditional__format_html_a18ce2238c9d2c51b79e9c9206c892a2c"><div class="ttname"><a href="structlxw__conditional__format.html#a18ce2238c9d2c51b79e9c9206c892a2c">lxw_conditional_format::max_value</a></div><div class="ttdeci">double max_value</div><div class="ttdef"><b>Definition:</b> worksheet.h:1073</div></div>
<div class="ttc" id="astructlxw__conditional__format_html_a6d4a5eb20238f46f2fc594f1a5e1bc33"><div class="ttname"><a href="structlxw__conditional__format.html#a6d4a5eb20238f46f2fc594f1a5e1bc33">lxw_conditional_format::max_color</a></div><div class="ttdeci">lxw_color_t max_color</div><div class="ttdef"><b>Definition:</b> worksheet.h:1086</div></div>
<div class="ttc" id="aworksheet_8h_html_aef79f21eefbda49cd04e338d958c8a95"><div class="ttname"><a href="worksheet_8h.html#aef79f21eefbda49cd04e338d958c8a95">worksheet_conditional_format_range</a></div><div class="ttdeci">lxw_error worksheet_conditional_format_range(lxw_worksheet *worksheet, lxw_row_t first_row, lxw_col_t first_col, lxw_row_t last_row, lxw_col_t last_col, lxw_conditional_format *conditional_format)</div><div class="ttdoc">Add a conditional format to a worksheet range.</div></div>
<div class="ttc" id="autility_8h_html_ad510ac6df573d23203374e24dba373d2"><div class="ttname"><a href="utility_8h.html#ad510ac6df573d23203374e24dba373d2">CELL</a></div><div class="ttdeci">#define CELL(cell)</div><div class="ttdoc">Convert an Excel A1 cell string into a (row, col) pair.</div><div class="ttdef"><b>Definition:</b> utility.h:45</div></div>
<div class="ttc" id="aworksheet_8h_html_affdc3f401f3ee241fad5d651628ac92da95e1b05b230b8964f78d676d0b114ed2"><div class="ttname"><a href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92da95e1b05b230b8964f78d676d0b114ed2">LXW_CONDITIONAL_3_COLOR_SCALE</a></div><div class="ttdeci">@ LXW_CONDITIONAL_3_COLOR_SCALE</div><div class="ttdef"><b>Definition:</b> worksheet.h:281</div></div>
<div class="ttc" id="aworksheet_8h_html_affdc3f401f3ee241fad5d651628ac92da073422bf8a6df5ddbabb3763aa7b27d8"><div class="ttname"><a href="worksheet_8h.html#affdc3f401f3ee241fad5d651628ac92da073422bf8a6df5ddbabb3763aa7b27d8">LXW_CONDITIONAL_2_COLOR_SCALE</a></div><div class="ttdeci">@ LXW_CONDITIONAL_2_COLOR_SCALE</div><div class="ttdef"><b>Definition:</b> worksheet.h:277</div></div>
<div class="ttc" id="aworkbook_8h_html_a279a5d7075d09a3931aae9782afede33"><div class="ttname"><a href="workbook_8h.html#a279a5d7075d09a3931aae9782afede33">workbook_add_format</a></div><div class="ttdeci">lxw_format * workbook_add_format(lxw_workbook *workbook)</div><div class="ttdoc">Create a new Format object to formats cells in worksheets.</div></div>
<div class="ttc" id="astructlxw__conditional__format_html_a171ca24363807d7071d7044f9586a481"><div class="ttname"><a href="structlxw__conditional__format.html#a171ca24363807d7071d7044f9586a481">lxw_conditional_format::min_value_string</a></div><div class="ttdeci">char * min_value_string</div><div class="ttdef"><b>Definition:</b> worksheet.h:1042</div></div>
<!-- HTML footer for doxygen 1.8.20-->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Copyright 2014-2020 John McNamara.
Generated by&#160;<a href="http://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.8.20
</small></address>
</body>
</html>
